wix / react-native-ui-lib

UI Components Library for React Native
https://wix.github.io/react-native-ui-lib/
MIT License
6.29k stars 695 forks source link

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

Open king960 opened 1 month ago

king960 commented 1 month ago

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

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

Affected platforms