peacechen / react-native-modal-selector

A cross-platform (iOS / Android), selector/picker component for React Native that is highly customizable and supports sections.
MIT License
370 stars 129 forks source link

How to change color of text (TextInput) inside ModalSelector? #156

Closed KyleZahn closed 3 years ago

KyleZahn commented 3 years ago

Hi,

If I have a component like so:

<ModalSelector> <TextInput style={styles.button} editable={false} placeholder="Animals" value="" /> </ModalSelector>

image

How do I change the color of the text that appears? In this case, I am referring to the text of the placeholder inside the TextInput (seen in the image as "Animals") and the selected value that will appear inside the TextInput after the user has made a selection.

I have tried applying "color: '#ff0000'" with all of the available APIs on ModalSelector and attempted to apply this style directly to the TextInput with no luck. Where should this style go to change the text in the scenario I described above?

Thank you

KyleZahn commented 3 years ago

Ended up using a Button instead of TextInput to solve this problem.