Massive/Select.tsx

30 lines
550 B
TypeScript
Raw Normal View History

2022-11-01 03:06:25 +00:00
import {useTheme} from 'react-native-paper'
import RNPickerSelect from 'react-native-picker-select'
import {Item} from 'react-native-picker-select'
2022-11-01 03:06:25 +00:00
export default function Select({
value,
onChange,
items,
2022-11-01 03:06:25 +00:00
}: {
value: string
onChange: (value: string) => void
items: Item[]
2022-11-01 03:06:25 +00:00
}) {
const {colors} = useTheme()
return (
<RNPickerSelect
style={{
placeholder: {
2022-11-16 01:32:47 +00:00
color: colors.primary,
},
}}
value={value}
2022-11-16 01:46:45 +00:00
placeholder={{}}
onValueChange={onChange}
items={items}
/>
2022-11-01 03:06:25 +00:00
)
}