how do i change style of the text in each option or reduce the width of separator? I tried doing it gives me a warning.
miteshrathod09 opened this issue · comments
Mitesh commented
Vitor Cavalcanti commented
I had the same problem trying to change the color of the text of my options and I had to reimplement the renderText function inside my component as below:
_renderText(option) {
if(typeof this.props.renderText === 'function') {
return this.props.renderText(option);
}
return (<Text style={styles.textStyle}>{option}</Text>);
}
And then use as this:
<MultipleChoice
options={[
'Lorem ipsum dolor sit',
'Lorem ipsum',
'Lorem ipsum dolor'
]}
renderText={(option)=>this._renderText(option)}
/>
I hope this helps.
Best,
Vitor Cavalcanti
Mitesh commented
Thank you @vitorcavalcanti !