Answers for "react conditional css style class"

11

react conditional classname

<div className={`banner ${active ? "active" : ""}`}>{children}</div>
Posted by: Guest on May-04-2020
3

conditional style prop react

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

style={{ textDecoration: todo.completed ? "line-through" : 'none' }}
Posted by: Guest on September-10-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language