react-native-ui-lib
react-native-ui-lib copied to clipboard
Can't set the picker's modal background color.
Description
It is not possible to change the picker's modal colour, because in PickerItemsList you use
'$backgroundDefault' that always falls back into white colour.
<View bg-$backgroundDefault style={wrapperContainerStyle} useSafeArea={useSafeArea}>
Related to
- [x] Components
- [ ] Demo
- [ ] Docs
- [ ] Typings
Steps to reproduce
Steps to reproduce the behavior:
- Create a picker
- Open the picker and see that the background is white.
Expected behavior
If there's an option to specifically set the overlay color, then it should work.
Actual behavior
pickerModalProps={{overlayBackgroundColor: 'red'}} has no effect
More Info
You can confirm that the overlayBackgroundColor will work if you do:
Colors.loadSchemes({ light: { $backgroundDefault: 'transparent', }, dark: { $backgroundDefault: 'transparent' } });
Code snippet
<Picker pickerModalProps={{overlayBackgroundColor: 'red'}} label={'test'} value={'test} onChange={(value) => {}} items={{label: 'test', value: ''}} />
Screenshots/Video
Environment
- React Native version: 0.74.1
- React Native UI Lib version: 7.23.2
Affected platforms
- [ ] Android
- [x] iOS
- [ ] Web