add condition inside a className in reactjs

JavaScript
<div className={`banner ${active ? "active" : ""}`}>{children}</div><span className={todo.completed ? "true" : ""}>className={`banner ${active ? "active" : ""}`}
Source

Also in JavaScript: