Skip to content

Releases: joe-bell/cva

v0.2.4

14 Oct 03:11
c788df1
Compare
Choose a tag to compare

What's Changed

  • Fix variant key 0 use-case by @Tatamethues in #43

New Contributors

  • @Tatamethues made their first contribution in #43 (thank you @Tatamethues! 🎉)

Full Changelog: v0.2.3...v0.2.4

v0.2.3

15 Jul 02:39
e97ee1e
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.2.2...v0.2.3

v0.2.2

12 Jun 03:47
cdfa9e0
Compare
Choose a tag to compare

What's Changed

  • Support for Typescript 4.7 (non-breaking change) by @joe-bell in #34

Full Changelog: v0.2.1...v0.2.2

v0.2.1

06 Apr 17:24
b0262c9
Compare
Choose a tag to compare

What's Changed

  • Support Compiling TypeScript with --declaration Flag by @joe-bell in #29

Full Changelog: v0.2.0...v0.2.1

v0.2.0

05 Apr 08:40
3ef88cc
Compare
Choose a tag to compare

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

v0.1.0

13 Feb 14:25
601c0b5
Compare
Choose a tag to compare

Adds support for boolean variants (huge thanks to @mariusflorescu) 🚀

const button = cva(["text-white", "bg-blue-700"], {
  variants: {
    disabled: {
      true: "opacity-50",
      false: "opacity-100",
    },
  },
});

button({ disabled: true });

v0.0.1

09 Feb 14:21
5937956
Compare
Choose a tag to compare

Initial release 🚀