@jdthornton/classnames
v1.0.1
Published
Class string joining made easy
Downloads
43
Readme
@jdthornton/classnames
Class string joining made easy.
Install
$ npm install @jdthornton/classnames
Usage
import classNames from "@jdthornton/classnames";
function makeClass({ className, primary }){
return classNames("container", primary && "primary", className)
}
console.log(makeClass({className: "card", primary: true}))
//=> "container primary card"