react conditionaly add classes code example
Example 1: react add class conditionally
<div className={`btn-group pull-right ${this.props.showBulkActions ? 'shown' : 'hidden'}`}>
Example 2: add condition inside a className in reactjs
className={`banner ${active ? "active" : ""}`}