github chakra-ui/panda @pandacss/shared@0.39.0

latest releases: @pandacss/token-dictionary@0.51.1, @pandacss/types@0.51.1, @pandacss/studio@0.51.1...
8 months ago

Patch Changes

  • 935ec86: Allow passing arrays of SystemStyleObject to the css(xxx, [aaa, bbb, ccc], yyy) fn

    This is useful when you are creating your own styled component and want to benefit
    from the recent css array property support.

    import { css } from 'styled-system/css'
    import type { HTMLStyledProps } from 'styled-system/types'
    
    type ButtonProps = HTMLStyledProps<'button'>
    
    export const Button = ({ css: cssProp = {}, children }: ButtonProps) => {
    -  const className = css(...(Array.isArray(cssProp) ? cssProp : [cssProp]))
    +  const className = css(cssProp)
      return <button className={className}>{children}</button>
    }

Don't miss a new panda release

NewReleases is sending notifications on new releases.