blem
functional block__element--modifier strings
memoized BEM string generators
install
yarn add blem -S
usage
const bem = // block === `xxx`// block with modifier === `xxx xxx--cool`// block with modifiers === `xxx xxx--a xxx-b xxx-c` // element === `xxx__yyy`// element with modifier === `xxx__yyy xxx__yyy--zzz`// element with modifiers === `xxx__yyy xxx__yyy--a xxx__yyy--b xxx__yyy--c` /*const X = ({ bem = blem(`xxx`) title}) => ( <div className={bem()}> <strong className={bem(`title`)}> {title} </strong> </div>)*/
original implementation credit: Thomas Shaddox @baddox