@h7ghost/make-bem
v0.3.3
Published
Library for generating class names string to use as props in html/jsx.
Downloads
6
Readme
make-bem
Library for generating class names string to use as props in html/jsx.
Usage example
const bem = makeBEM("block");
console.log(bem()); // "block"
console.log(bem(null, ["hello"])); // "block block--hello";
const cls = bem("element",
{
"foo": true,
"bar": false,
"object": {}
},
["array"]
);
console.log(cls); // "block__element block__element--foo block__element--object block__element--array"