I have a textinput that changes color if the conditions are met or not (green to brown and vice versa) when it is focused.
I would like the colors to stay the same even when the input is unfocused.
Focused and verifications not ok:
Focused and verifications ok:
Unfocused verifications okay or not:
My code:
//Change brow to green, green to brown
const [inputColor, setInputColor] = useState("brown");
<TextInput
//{...}
theme={{
colors: {
primary: inputColor,
underlineColor: inputColor,
},
}}
/>;
I tried to change:
- underlineColor props.
- borderColor, backgroundColor, color in styles, but nothing is working so far.