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 toall
. This is currently the default.Setting it to
minimal
(which also allows passing the css prop) ornone
(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 aposition
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/core@0.30.2
- @pandacss/config@0.30.2
- @pandacss/logger@0.30.2
- @pandacss/extractor@0.30.2
- @pandacss/shared@0.30.2