Unable to change text color
ymas086 opened this issue · 2 comments
ymas086 commented
I can't change the color of text, which is all the more apparent when I select a highlight color that makes the default text color more difficult to see.
thegamenicorus commented
Hello @ymas086
Please try this sample code::
constructor() {
super();
this.state = {
index: 1
};
}
<RadioGroup
onSelect = {(index, value) => this.onSelect(index, value)}
size={24}
thickness={2}
color='#9575b2'
highlightColor='#ccc8b9'
activeColor='red'
selectedIndex={this.state.index}
>
<RadioButton value={'item1'} >
<Text style={{color:this.state.index == 0?'red':'black'}}>This is item #1</Text>
</RadioButton>
<RadioButton value={'item2'}>
<Text style={{color:this.state.index == 1?'red':'black'}}>This is item #2</Text>
</RadioButton>
<RadioButton value={'item3'}>
<Text style={{color:this.state.index == 2?'red':'black'}}>This is item #3</Text>
</RadioButton>
</RadioGroup>
ymas086 commented
Yup, worked like a charm. Thank you very much.
I guess this is one of those moments where my amateur skills are made apparent, huh?