abem
Extremely simple and small (~0.25Kb minified) ABEM class name generator. Developed for using with babel-plugin-transform-jsx-abem.
Note: This plugin doesn't apply any string transformation. camelCase should be applied earlier on.
Installation
npm install abem
Syntax
const _abem =
arg | type |
---|---|
options | object (default: { separators: { element: '__', modifier: '-' } } ) |
block | string |
element | string | null |
modifiers | string | array | object | null |
mixins | string | array | object | null |
Examples
let _abem = // "o-animal__elephant" // "o-animal__elephant -mod1 -mod2" // "o-animal__elephant -mod1 mix" // "o-animal mix" _abem = // "o-animal___elephant --mod"
Send some love
You like this package?