react-native-material-textfield icon indicating copy to clipboard operation
react-native-material-textfield copied to clipboard

labelTextStyle doesn't function

Open shamilovtim opened this issue 5 years ago • 6 comments

Example: <Textfield labelTextStyle={{ color: 'red' }} />

This prop doesn't currently affect the label.

shamilovtim avatar Nov 08 '19 23:11 shamilovtim

Try tintColor={'red'}

bhavukjain1 avatar Nov 10 '19 06:11 bhavukjain1

Try tintColor={'red'}

tinitColor is applied when focus is on the textfield. But I want to change color of placeholder

Hamza-Khurshid avatar Jan 15 '20 12:01 Hamza-Khurshid

Try tintColor={'red'}

tinitColor is applied when focus is on the textfield. But I want to change color of placeholder

you can use placeholderTextColor to change placeholder color

claryt avatar Mar 19 '21 15:03 claryt

Update src/components/label/index.js order of style propogation to Animated.Text to be [styles.text, textStyle, style]

You can use patch-package module to keep this change in your project git

Knight704 avatar Apr 05 '21 08:04 Knight704

I also need to set the placeholder color and when I search the whole repo, placeholderTextColor only shows up in this issue.

stmiller-shamrock avatar Apr 29 '21 21:04 stmiller-shamrock

I was able to change the color of the label using a combination of baseColor and tintColor:

baseColor={Theme.lightgray}
tintColor={isFocused ? Theme.blue : Theme.lightgray}

Tintcolor was working to change the color only when the input was focused. Once I found the baseColor prop I was able to change the color of the label when it wasn't focused.

stmiller-shamrock avatar Apr 30 '21 14:04 stmiller-shamrock