Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Ternary Operator react 3 Conditions

<div style={{'backgroundColor': status === 'approved' ? 'blue' : status === 'pending' ? 'black' : 'red'}}>
</div>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Ternary #Operator #react #Conditions
ADD COMMENT
Topic
Name
9+6 =