classname react multiple classes code example
Example 1: give multiple classes in modular css react
className={`${styles.description} ${styles.yellow}`}
Example 2: jsx classname multiple
<div className={`${this.state.className} ${this.props.content.divClassName}}`>
...
</div>
<div className={[this.state.className, this.props.content.divClassName].join(" ")}>
...
</div>
Example 3: How to add multiple classes to a ReactJS Component
var liClasses = classNames({
'main-class': true,
'activeClass': self.state.focused === index
});
return (<li className={liClasses}>{data.name}</li>);