react-style-classes
v2.0.3
Published
Javascript package for merge arguments
Downloads
10,793
Maintainers
Readme
react-style-classes by Kontentino
Javascript package for merge arguments of component style classnames or merge another arguments.
Installation
$ npm install react-style-classes
or
$ yarn add react-style-classes
Usage
import classes from 'react-style-classes';
Example
<div className={ classes("className1", "className2") } />
or use CSS modules
<div className={ classes("className1", "className2", style.container) } />
or even use Array
<div className={ classes("className1", "className2", ['class1', 'class2']) } />
Automatically filters boolean values
<div className={ classes("className1", "className2", isModalVisible && style.modalWrapperVisible) } />