JavaScript class to compose reusable objects that result in a `block__element--modifier` string.
MIT License
Bot releases are hidden (Show)
Full Changelog: https://github.com/frontendr/bemmed/compare/1.6.1...1.6.2
Published by frontendr over 1 year ago
propTypes
property is no longer available on the BEM
object. You can import it directly from bemmed/proptypes
in order to keep the bundle size as small as possible.Published by frontendr over 1 year ago
.s
getter for cleaner and easier .toString()
calls on BEM
and BEMList
instances.Published by frontendr over 1 year ago
Published by frontendr over 3 years ago
Refactored BEM.propType
into a BEM.propTypes
object with multiple propTypes
functions.
The propTypes all have a isRequired
property to ensure the prop has a value.
BEM.propTypes.bem
: New propType to check for BEM
instances.BEM.propTypes.className
: PropType to check if a prop is a valid className (including BEM objects). This was the original BEM.propType
which is still present but deprecated.BEM.propTypes.element
: PropType to check if a prop can be used as a value for BEM.element()
.BEM.propTypes.modifier
: PropType to check if a prop can be used as a value for BEM.modifier()
.Deprecations
BEM.propType
is deprecated in favor of BEM.propTypes.className
.BEMTypes
export is also deprecated. It wasn't documented so doubt anyone uses it anyway.Published by frontendr over 3 years ago
BEMList.concat()
the same as BEM.concat()
. Both remove any duplicate arguments.Published by frontendr over 3 years ago
.elements()
.