n4kz / react-native-material-dropdown

Material dropdown with consistent behaviour on iOS and Android
Other
732 stars 597 forks source link

Set a different color for label and the line underneath on iOS #183

Closed raphaelpinel closed 4 years ago

raphaelpinel commented 4 years ago

I am trying to get a different color for the label and the line underneath. Any idea how I could achieve that? If I change the baseColor property it automatically changes the color of the arrow and the line underneath. I want the style to be consistent with other TextInputs on the screen... For android I use the property underlineColorAndroid="transparent", that works

In the screenshot (iOS), you can see that if I set the baseColor to black, the line gets also black. I would like it to be grey.

Screenshot 2019-10-15 at 15 51 55

raphaelpinel commented 4 years ago

I opened this post on StackOverflow with more details and code https://stackoverflow.com/questions/58430323/edit-underline-color-in-react-native-material-dropdown-on-ios-without-changing-a

raphaelpinel commented 4 years ago

I got it working thanks to this answer: https://github.com/n4kz/react-native-material-dropdown/issues/23 I set inputContainerStyle={{ borderBottomColor: Colors.midGrey, borderBottomWidth: 1 }} with with const colors = {midGrey: 'rgba(214, 219, 224, 1)'};

SrikaraBhat commented 4 years ago

How to set different color for label and arrow icon?

Satur-nity commented 4 years ago

How to set a different color for label and arrow icon?

Have anyone know that ?