react-native-ui-lib icon indicating copy to clipboard operation
react-native-ui-lib copied to clipboard

Can't set the picker's modal background color.

Open king960 opened this issue 1 year ago • 0 comments

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:

  1. Create a picker
  2. 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

king960 avatar May 31 '24 11:05 king960