github chakra-ui/panda @pandacss/preset-atlaskit@1.0.0

latest releases: @pandacss/preset-base@1.2.0, @pandacss/token-dictionary@1.2.0, @pandacss/logger@1.2.0...
one month ago

Major Changes

  • a3bcbea: Stable release of PandaCSS

    Style Context

    Add createStyleContext function to framework artifacts for React, Preact, Solid, and Vue frameworks

    import { sva } from 'styled-system/css'
    import { createStyleContext } from 'styled-system/jsx'
    
    const card = sva({
      slots: ['root', 'label'],
      base: {
        root: {
          color: 'red',
          bg: 'red.300',
        },
        label: {
          fontWeight: 'medium',
        },
      },
      variants: {
        size: {
          sm: {
            root: {
              padding: '10px',
            },
          },
          md: {
            root: {
              padding: '20px',
            },
          },
        },
      },
      defaultVariants: {
        size: 'sm',
      },
    })
    
    const { withProvider, withContext } = createStyleContext(card)
    
    const CardRoot = withProvider('div', 'root')
    const CardLabel = withContext('label', 'label')

    Then, use like this:

    <CardRoot size="sm">
      <CardLabel>Hello</CardLabel>
    </CardRoot>

Patch Changes

  • Updated dependencies [a3bcbea]
    • @pandacss/types@1.0.0

Don't miss a new panda release

NewReleases is sending notifications on new releases.