Closed fazouane-marouane closed 6 years ago
Hi @fazouane-marouane,
That concept does work, but you need some additional syntax. Here is your example rewritten. Let me know if you have any additional questions!
color: '${ props.stuff? "red" : "blue" }'
Thanks it works like a charm!
Hi,
Is there a way to use props values to determine styles? I would have expected the following to work
color: this.props.stuff? 'red': 'blue'
. But it doesn't.Can you explain how would one can achieve such a thing? Thanks.