how to add a class to react component after checking the condition code example
Example 1: add condition inside a className in reactjs
className={`banner ${active ? "active" : ""}`}
Example 2: react conditional class
<div className={"btn-group pull-right " + (this.props.showBulkActions ? 'show' : 'hidden')}>