selvamk-js / sharingan-rn-modal-dropdown

A simple and customizable react-native dropdown created using react-native-modal and react-native-paper.
MIT License
85 stars 28 forks source link

Label, MainContainerTextStyle, & Unselected Item styling #24

Closed lomo09 closed 3 years ago

lomo09 commented 3 years ago

I'm trying to change the color of the label, and the text that it's above in the mainContainer when a user selects an option. I've been searching for a while now and cant seem to find it maybe I'm missing something. Also it would be nice to customize the color of the unselected items in the dropdown. Is this possible?

Here is what I have currently...

           <Dropdown
              label="Thing"
              data={dropdownData}
              // enableSearch
              primaryColor={green}
              value={this.state.selectedThing}
              onChange={this.setSelectedThing.bind(this)}
              itemTextStyle={{color: darkBlue}}
              underlineColor={darkBlue}
              selectedItemTextStyle={{color: darkBlue}}
              selectedItemViewStyle={{backgroundColor: green}}
              parentDDContainerStyle={{backgroundColor: lightBlue}}
              mainContainerStyle={{backgroundColor: darkBlue, color: green}}
              itemContainerStyle={{backgroundColor: lightBlue}}
              activityIndicatorColor={{color: lightBlue}}
            />

If I'm just missing something please let me know! If it's not possible it would be great to be able to customize these pieces as you can customize almost everything else. Thank you for this tool!

note: Just an FYI I didn't see primaryColor in your docs either...first saw that option in the example.

selvamk-js commented 3 years ago

You should be able to do this by using the theme option, can you have a look into the react-native-paper theme customization. You can search for changing native-paper text input label color.