A simple JavaScript utility for conditionally joining classNames together for CSS Modules.
npm i @pandolajs/classnames
import classnames from '@pandolajs/classnames'
import styles from 'path/to/style/file'
const jsx = (<div className={styles, { foo: true, bar: condition }} />)
- cssModules: CSSModules, optional
This is an object of CSS Modules
-
props: {[string]: condition | boolean}, required
-
extra: string, optional