add style inline in react with conditionally code example
Example: conditional style prop react
style={{ textDecoration: todo.completed && "line-through" }}
style={{ textDecoration: todo.completed ? "line-through" : 'none' }}
style={{ textDecoration: todo.completed && "line-through" }}
style={{ textDecoration: todo.completed ? "line-through" : 'none' }}