Open margauxflores opened 1 month ago
Update: I moved preset.ts
to the src
folder and it didn't seem to affect anything.
Update again:
I managed to get the recipes working from preset and I have tried to isolate the colors issue by directly adding the value to the values to definePreset({})
but it's still not overriding the accent color.
preset.ts
import { definePreset } from "@pandacss/dev";
import { createPreset } from "@park-ui/panda-preset";
import recipes from "./theme/recipes";
import slotRecipes from "./theme/slot-recipes";
export const designSystemPreset = definePreset({
presets: [
"@pandacss/preset-base",
"@park-ui/panda-preset",
createPreset({
grayColor: "neutral",
borderRadius: "sm",
additionalColors: [
"amber",
"cyan",
"purple",
"pink",
"sand",
"green",
"red",
],
}),
],
theme: {
extend: {
semanticTokens: {
colors: {
accent: {
1: {
value: {
base: "#535AE8",
_dark: "#535AE8",
},
},
default: {
value: {
base: "#535AE8",
_dark: "#535AE8",
},
},
},
bg: {
body: {
value: {
base: "#FFF",
_dark: "#000",
},
},
},
},
},
slotRecipes,
recipes: {
...recipes,
button: {
variants: {
variant: {
solid: {
color: "white",
_hover: { color: "white", _dark: { color: "black" } },
},
},
},
},
},
},
},
});
Hello guys! First of all, thank you for all your hard work for Park UI.
So I'm trying to create a shared component library based on Park UI and PandaCSS (obviously π ) and replacing a previous design-system we had. I'm using tsup to build my package and I managed to get it working. Basically, my file structure looks something like this:
Here are my configurations:
colors.ts
design-system/preset.ts
Note: slotRecipe is coming from the slot-recipe folder with an index.ts that looks something like this:
Here are the panda configs.
design-system/panda.config.ts
console/panda.config.ts
For some reason, everything that I put on
theme: { extend : {} }
does not get reflected on my Next.js app even with everything working.Am I missing something? I tried moving the extend to
console/panda.config.ts
and I managed to get it working there, but I would really like it to work from thedesign-system
package level cause then I'd have to add the recipes and semantic token overrides to every application that will be using this design-system which kind of defeats the purpose of having a shared component library.