██████╗ ██╗ ███████╗███╗ ███╗ ██████╗ ███████╗ █████╗ ██████╗████████╗
██╔══██╗██║ ██╔════╝████╗ ████║ ██╔══██╗██╔════╝██╔══██╗██╔════╝╚══██╔══╝
██████╔╝██║ █████╗ ██╔████╔██║█████╗██████╔╝█████╗ ███████║██║ ██║
██╔══██╗██║ ██╔══╝ ██║╚██╔╝██║╚════╝██╔══██╗██╔══╝ ██╔══██║██║ ██║
██████╔╝███████╗███████╗██║ ╚═╝ ██║ ██║ ██║███████╗██║ ██║╚██████╗ ██║
╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝
blem-react
Example usage
// wrap your component with a withBlem decoratorconst MyComponent = // pass in the "base" prop to the BlemProviderconst App = <div> <BlemProvider base="Base"> <MyComponent bem="element"/> <MyComponent bem="element" "modifier" /> </BlemProvider> </div>
The above component would render classnames like so:
Cool Cool
See the tests and the snapshots for more!
Source
https://gitlab.com/brekk/blem-react
This is a work-in-progress module, please feel free to file issues on Gitlab.