Skip to content

v0.2.0

Compare
Choose a tag to compare
@joe-bell joe-bell released this 05 Apr 08:40
· 171 commits to main since this release
3ef88cc

Fixes

  • Improved/corrected support for boolean variants; both as a prop and defaultVariant

Features

  • defaultVariants styles can now be disabled/removed completely by setting the relevant variant as null

    const button = cva("button", {
     variants: {
       disabled: { false: "button--enabled", true: "button--enabled" },
     },
     defaultVariants: {
       disabled: false,
     },
    });
    
    const buttonWithDefault = button();
    // "button button--enabled"
    
    const buttonWithoutDefault = button({ disabled: null });
    // "button"

Pull Requests

  • chore(deps): bump follow-redirects from 1.14.7 to 1.14.8 by @dependabot in #11
  • Advise aliasing during install instead of TS Paths by @hasparus in #17
  • docs: remove unnecessary comment in README by @williamhzo in #18
  • fix: allow both boolean states for boolean variant by @brattonross in #22
  • Add missing word to README by @hasparus in #26
  • Fix Behaviour of Falsey Boolean Variants by @joe-bell in #24

New Contributors

Full Changelog: v0.1.0...v0.2.0