🐼 Panda v0.15.3 #1438
anubra266
announced in
Announcements
🐼 Panda v0.15.3
#1438
Replies: 1 comment
-
This is possibly a stupid question, but in our case we're splitting up the preset and config. But when defining a preset, you extend the theme with the recipes there: return definePreset({
theme: {
keyframes: keyframes,
tokens: {
// to overwrite the default tokens we need to add them here,
// this removes all Panda presets under that token namespace
...pandaPreset.theme.tokens,
colors: colors,
easings: easings,
animations: animations,
},
// To add additional tokens we can add them to extend
extend: {
recipes: {
...recipes,
},
// Use our text styles
textStyles: {
...textStyles,
}, So it's slightly counter-intuitive, at least in our scenario where we want a master config, but be able to load different presets per project, to have the importMap in the config. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To upgrade to v0.15.3:
What's Changed
Fixed
ExtendableUtilityConfig
typings after a regression in 0.15.2 (due totypes: switch to interfaces and rm DeepPartial #1410)
ExtendableTheme
(specifically make theRecipeConfig
Partial inside thetheme: { extend: { ... } }
object),same for slotRecipes
Added
config.importMap
option that allows you to specify a custom module specifier to import from instead ofbeing tied to the
outdir
You can now do things like leverage the native package.json
imports
:Or you could also make your outdir an actual package from your monorepo:
Working with tsconfig paths aliases is easy:
Changed
Automatically allow overriding config recipe compoundVariants styles within the
styled
JSX factory, example belowWith this config recipe:
This would previously not merge the
color
property overrides, but now it does:btn btn--size_small text_blue text_red.100
btn btn--size_small text_red.100
Beta Was this translation helpful? Give feedback.
All reactions