github chakra-ui/panda @pandacss/core@0.30.2

latest releases: @pandacss/types@1.3.0, @pandacss/token-dictionary@1.3.0, @pandacss/extractor@1.3.0...
19 months ago

Patch Changes

  • 6b829ca: Allow configuring the matchTag / matchTagProp functions to customize the way Panda extracts your JSX.
    This can be especially useful when working with libraries that have properties that look like CSS properties but are
    not and should be ignored.

    Note: This feature mostly affects users who have jsxStyleProps set to all. This is currently the default.

    Setting it to minimal (which also allows passing the css prop) or none (which disables the extraction of CSS
    properties) will make this feature less useful.

    Here's an example with Radix UI where the Select.Content component has a position property that should be ignored:

    // Here, the `position` property will be extracted because `position` is a valid CSS property
    <Select.Content position="popper" sideOffset={5}>
    export default defineConfig({
      // ...
      hooks: {
        'parser:before': ({ configure }) => {
          configure({
            // ignore the Select.Content entirely
            matchTag: (tag) => tag !== 'Select.Content',
            // ...or specifically ignore the `position` property
            matchTagProp: (tag, prop) => tag === 'Select.Content' && prop !== 'position',
          })
        },
      },
    })
  • Updated dependencies [6b829ca]

    • @pandacss/types@0.30.2
    • @pandacss/logger@0.30.2
    • @pandacss/token-dictionary@0.30.2
    • @pandacss/is-valid-prop@0.30.2
    • @pandacss/shared@0.30.2

Don't miss a new panda release

NewReleases is sending notifications on new releases.