-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpanda.config.ts
55 lines (46 loc) · 1.36 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
import { defineConfig } from '@pandacss/dev';
import { colorsTokens, semanticColorTokens } from './panda.config/colors';
import { insetFocusRing } from './panda.config/utilities/focusring.utility';
export default defineConfig({
// Whether to use css reset
preflight: true,
strictTokens: true,
presets: ['@pandacss/preset-base', '@pandacss/preset-panda'],
// Where to look for your css declarations
include: ['./src/**/*.{js,jsx,ts,tsx}', './pages/**/*.{js,jsx,ts,tsx}'],
// Files to exclude
exclude: [],
globalCss: {
html: {
height: '100%',
width: '100%',
overflow: 'hidden',
},
body: {
bg: '{colors.htmlBackground}',
overflow: 'hidden',
},
},
utilities: {
extend: {
insetFocusRing,
},
},
hooks: {
'config:resolved': ({ config, utils }) => {
// Remove every colors
const updated = utils.omit(config, ['theme.tokens.colors', 'theme.semanticTokens.colors']);
updated.theme ??= {};
updated.theme.tokens ??= {};
updated.theme.semanticTokens ??= {};
// Only add those from your custom preset
updated.theme.tokens.colors = colorsTokens;
updated.theme.semanticTokens.colors = semanticColorTokens;
return updated;
},
},
jsxFramework: 'react',
jsxStyleProps: 'all',
// The output directory for your css system
outdir: 'styled-system',
});