diff --git a/native/calendar/calendar-input-bar.react.js b/native/calendar/calendar-input-bar.react.js index 881d8d25d..8a7939bcc 100644 --- a/native/calendar/calendar-input-bar.react.js +++ b/native/calendar/calendar-input-bar.react.js @@ -1,54 +1,45 @@ // @flow import * as React from 'react'; import { View, Text } from 'react-native'; -import { connect } from 'lib/utils/redux-utils'; - import Button from '../components/button.react'; -import type { AppState } from '../redux/redux-setup'; -import { styleSelector } from '../themes/colors'; +import { useStyles } from '../themes/colors'; type Props = {| - onSave: () => void, - disabled: boolean, - // Redux state - styles: typeof styles, + +onSave: () => void, + +disabled: boolean, |}; function CalendarInputBar(props: Props) { - const inactiveStyle = props.disabled - ? props.styles.inactiveContainer - : undefined; + const styles = useStyles(unboundStyles); + const inactiveStyle = props.disabled ? styles.inactiveContainer : undefined; return ( ); } -const styles = { +const unboundStyles = { container: { alignItems: 'flex-end', backgroundColor: 'listInputBar', }, inactiveContainer: { opacity: 0, }, saveButtonText: { color: 'link', fontSize: 16, fontWeight: 'bold', marginRight: 5, padding: 8, }, }; -const stylesSelector = styleSelector(styles); -export default connect((state: AppState) => ({ - styles: stylesSelector(state), -}))(CalendarInputBar); +export default CalendarInputBar;