import { StyleSheet, ViewStyle } from 'react-native'; import { PickerItemStyleSheetVars } from './PickerItem.types'; import { Theme } from '../../../util/theme/models'; /** * Style sheet function for PickerItem component. * * @param params Style sheet params. * @param params.theme App theme from ThemeContext. * @param params.vars Inputs that the style sheet depends on. * @returns StyleSheet object. */ const styleSheet = (params: { theme: Theme; vars: PickerItemStyleSheetVars; }) => { const { vars, theme } = params; const { colors } = theme; const { style } = vars; return StyleSheet.create({ base: Object.assign( { flexDirection: 'row', alignItems: 'center', paddingHorizontal: 16, borderWidth: 1, borderColor: colors.border.default, borderRadius: 4, backgroundColor: colors.background.default, } as ViewStyle, style, ) as ViewStyle, dropdownIcon: { marginLeft: 16, }, }); }; export default styleSheet;