Styling React Native Picker
android, ios, javascript, react-native, reactjs
Solution
To change the colour you need to use this:
<Item label="blue" color="blue" value="blue" />
Problem
I'm attempting to style the text color of the items in a React Native picker. I've only been working in iOS so far, but if I could find a cross-platform solution that'd be awesome. I've tried the following things: Styling color on Picker ``` <Picker style={{color:'white'}} ...etc > ``` Styling color on Picker Items ``` <Picker.Item style={{color:'#fff'}} label={'Toronto'} value={'Toronto'} /> ``` I've also seen some examples of adding a color property, so I tried this ``` <Picker.Item color='white' label={'Toronto'} value={'Toronto'} /> ``` At a total loss here. Thanks for any insight! EDIT: Here's a solution - use itemStyle prop in the Picker element. I believe this is iOS only. ``` <Picker itemStyle={{color:'white'}} > <Picker.Item color='white' label={'Toronto'} value={'Toronto'} /> <Picker.Item label={'Calgary'} value={'Calgary'} /> </Picker> ```