https://github.com/morlay/react-bem-mixin
https://github.com/morlay/react-bem-mixin
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/morlay/react-bem-mixin
- Owner: morlay
- Created: 2015-02-16T12:24:34.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-16T12:26:05.000Z (over 11 years ago)
- Last Synced: 2025-02-08T15:44:44.264Z (over 1 year ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## React Bem Mixin
just a simple bem mix to quick add bem classes in a component.
[](https://travis-ci.org/morlay/react-bem-mixin)
[](https://david-dm.org/morlay/react-bem-mixin)
## Usage
See example
### `this.$$block`
covert from this.constructor.displayName
### `this.$bemx(String:block[,String:elem, Object:mods, Array:mix])`
mix item is
{
block: 'String'
elem: 'String'
mods: 'Object'
}
block and elem must use together
### `this.$emx([String:elem, Object:mods, Array:mix])`
sort for $bemx, use `$$block` as argument `block`