combine-class-names
v1.1.0
Published
A simple utility for combining classNames into a list.
Downloads
3
Maintainers
Readme
combine-class-names
Install
npm i -S combine-class-names
API
type ClassNameItem =
| string
| { [className: string]: boolean }
| (string | { [className: string]: boolean })[]
function combineClassNames(...items: ClassNameItem[]): string[]
Example
import combineClassNames from 'combine-class-names'
let classList = combineClassNames('element', { 'element--primary': true })