v0.6.0
What's Changed
-
cx
→clsx
by @joe-bell in #152cva
now usesclsx
under-the-hood to concatenate classes with no breaking changes to the current experience and no increase to bundle-size.The existing
cx
export still exists, but as an alias ofclsx
Bringing additional benefits of:
-
Provides additional support for booleans and variadic strings within
class
orclassName
propsconst button = cva([true && "button-base", false && "not-rendered"]); // => 'button-base' const buttonConsumer = button({ class: [true && "extra-class"] }); // => 'button-base extra-class'
-
Provides support for object syntax within
class
orclassName
propsconst button = cva({ foo: true, bar: false }); // => 'foo baz'
-
Full Changelog: v0.5.3...v0.6.0