-
Notifications
You must be signed in to change notification settings - Fork 0
/
panda.config.ts
57 lines (56 loc) · 1.72 KB
/
panda.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { defineConfig } from "@pandacss/dev";
import { createPreset } from "@park-ui/panda-preset";
export default defineConfig({
presets: [
"@pandacss/preset-panda",
"@park-ui/panda-preset",
createPreset({ accentColor: "jade", grayColor: "sage", borderRadius: "md" }),
],
preflight: true,
minify: true,
importMap: "@/lib/styled",
include: ["./src/**/*.{js,jsx,ts,tsx}"],
globalCss: {
extend: {
html: { h: "full", "--global-font-body": "{fonts.sans}" },
body: { h: "full", display: "flex", flexDir: "column" },
"body > *": { flex: "1 0 auto" },
"header, footer": { flex: "none" },
},
},
theme: {
extend: {
recipes: { button: { jsx: ["Button", "SubmitButton", "FormButton"] } },
semanticTokens: {
colors: { bg: { canvas: { value: "{colors.bg.default}" } } },
},
slotRecipes: {
// for some reason, the default font color here is "fg.muted", overriding it to "fg.default"
splitter: { base: { panel: { color: "fg.default" } } },
},
tokens: {
borders: ["default", "muted", "subtle", "disabled", "outlined"].reduce(
(acc, border) => ({ ...acc, [border]: { value: `1px solid {colors.border.${border}}` } }),
{}
),
fonts: { sans: { value: "{fonts.outfit}, var(--font-fallback)" } },
},
},
},
utilities: {
extend: {
underline: {
className: "underline",
shorthand: "ul",
values: ["always", "hover", "none"],
transform: (value: string) =>
({
always: { textDecoration: "underline" },
none: { textDecoration: "none" },
hover: {},
})[value],
},
},
},
jsxFramework: "react",
});