apply-classes
v1.0.3
Published
Apply css classes dynamically
Downloads
37
Readme
apply-classes
A small utility to apply classes, the use case to use it is in React.
Install
npm i --save apply-classes
yarn add apply-classes
Usage
import applyClasses from 'apply-classes'
const Example = () => (
<div className={applyClasses({
'example': true,
'hidden': false
})}></div>
)
It will render only the truthy conditions
License
MIT. Copyright (C) Gabriel García Seco