Cnilton / react-native-floating-label-input

A customizable React Native TextInput with its placeholder always shown. Includes masks, global styles, character count, and a bunch else.
MIT License
291 stars 59 forks source link

Changing label color is a bit counter intuitive #134

Closed BuXXe closed 2 years ago

BuXXe commented 2 years ago

I tried to change the color of the label by using the label_styles property given in your documentation. If you use the properties you gave in your example (backgroundColor: '#fff', paddingHorizontal: 5) they work as expected. If you now try to change the text color of the label by using the commonly known property (ex. color="red") it doesnt seem to do anything.

I solved this issue by using the customLabelStyles={{ colorFocused: 'red', colorBlurred:'green'}} property. It took me a few minutes to find this and I saw a closed issue related to label coloring problems, so i guess this issue isnt only on my side.

Dont think it is necessary to change something implementation vise but maybe a note in the documentation would be helpful. Still, thanks for your work :)

Cnilton commented 2 years ago

hi @BuXXe, could you please open a PR for adding this to the readme section? It would be of great help!

BuXXe commented 2 years ago

137 Done :)

Cnilton commented 2 years ago

Thanks, I'll close this now 🚀