Skip to content

v1.0.0

Choose a tag to compare

@esamattis esamattis released this 04 Dec 11:49
· 30 commits to master since this release

1.0 馃帀

With one breaking change: The bemed() function is no longer a higher-order function just takes the name as an option like other options.

Migration:

const Button = bemed({ as: "button" })("Button");

to

const Button = bemed({ name: "Button", as: "button" });

The name property is also now an optional which can be automatically generated from the variable name using the Babel plugin.

Here's a jscodeshift transform that can automate this https://github.com/esamattis/react-bemed/blob/master/jscodeshift/v1.0-upgrade.ts

Other changes

  • Enum mods can be provided with a default with defaultMods
  • Allow arrays of class names in mods
  • Enable precompilation by default 3e429dd
  • Assert duplicate names in production builds 59ad3b9
  • Add generateName() babel plugin option dc1041e
  • Document Tailwind usage ee11911
  • Generate class name from the css string if no name was provided a1aedf9

All changes v0.7.5...v1.0.0