BEM CSS class name generator for use in React
npm install bem-blockBEM CSS class names generator for use in React
Created a simple BEM library because all the string concatenation was driving me crazy.
BEM info: http://getbem.com/naming/
npm install bem-block --saveimport block from 'bem-block';var block = require('bem-block');Example
``js`
const myBlock = block('my-block', 'some-modifier');
// or
const myBlock = block('my-block', ['some-modifier', 'another-modifier']);
// or
const myBlock = block('my-block', {
'some-modifier': true,
'another-modifier': false,
});`
Then in JSXjs`
`
Will produce:html``