Skip to content

v0.1.14

Compare
Choose a tag to compare
@jrgarciadev jrgarciadev released this 02 Sep 15:40
· 39 commits to main since this release

What's Changed

  • fix: support false variants when using compoundSlots by @mskelton in #83
  • feat: Add support for slot level variant overrides by @mskelton in #82

Slots Variant Overrides

This is useful in a variety of situations:

  1. Component libraries that provide slot level class name functions:
    const {base,tab} = tv({...})
    
    <Tabs className={() => base()}>
      <Tab className={({ isSelected }) => tab({isSelected})}>
        Settings
      </Tab>
    </Tabs>
  2. Reusing styles for vary similar components.
    const {base,item} = tv({...})
    
    <Nav className={base()}>
      <NavItem className={item({isActive: activeItem === 'foo'})}>foo</NavItem>
      <NavItem className={item({isActive: activeItem === 'bar'})}>bar</NavItem>
    </Nav>

Full Changelog: v0.1.13...v0.1.14

Huge thanks to @mskelton and @tianenpang πŸ™πŸ»