Minor Changes
-
a669f4d: Introduce new slot recipe features.
Slot recipes are useful for styling composite or multi-part components easily.
sva
: the slot recipe version ofcva
defineSlotRecipe
: the slot recipe version ofdefineRecipe
Definition
import { sva } from 'styled-system/css' const button = sva({ slots: ['label', 'icon'], base: { label: { color: 'red', textDecoration: 'underline' }, }, variants: { rounded: { true: {}, }, size: { sm: { label: { fontSize: 'sm' }, icon: { fontSize: 'sm' }, }, lg: { label: { fontSize: 'lg' }, icon: { fontSize: 'lg', color: 'pink' }, }, }, }, defaultVariants: { size: 'sm', }, })
Usage
export function App() { const btnClass = button({ size: 'lg', rounded: true }) return ( <button> <p class={btnClass.label}> Label</p> <p class={btnClass.icon}> Icon</p> </button> ) }
Patch Changes
- 2d2a42d: Fix staticCss recipe generation when a recipe didnt have
variants
, only abase
- Updated dependencies [24e783b]
- Updated dependencies [9d4aa91]
- Updated dependencies [386e509]
- Updated dependencies [a669f4d]
- @pandacss/shared@0.10.0
- @pandacss/types@0.10.0
- @pandacss/token-dictionary@0.10.0
- @pandacss/error@0.10.0
- @pandacss/logger@0.10.0