Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

conditional style prop react

style={{ textDecoration: todo.completed && "line-through" }}

style={{ textDecoration: todo.completed ? "line-through" : 'none' }}
Source by malcoded.com #
 
PREVIOUS NEXT
Tagged: #conditional #style #prop #react
ADD COMMENT
Topic
Name
7+7 =