can you have an if else statement inside this ```style={{ }}```

i was wondering if you can do an if else statement inside
style={{ }}
style={{ }}
, like do this static color in when this happens and do this color when this happens etc
No description
1 Reply
MarkBoots
MarkBoots14mo ago
Not sure, but think you can just do it with a ternary (it is just an object key:value pair)
style={{ color: selected ? textColor : 'green' }}
style={{ color: selected ? textColor : 'green' }}
Want results from more Discord servers?
Add your server