Skip to content

Commit 74dace3

Browse files
committed
更新 PostCSS 和 Tailwind 配置以支持设计器功能,添加自定义颜色和边框半径
1 parent b7403f1 commit 74dace3

2 files changed

Lines changed: 46 additions & 8 deletions

File tree

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
export default {
2-
content: [
3-
"./index.html",
4-
"./src/**/*.{js,ts,jsx,tsx}",
5-
"../../packages/ui/src/**/*.{js,ts,jsx,tsx}",
6-
"../../packages/renderer/src/**/*.{js,ts,jsx,tsx}",
7-
"../../packages/designer/src/**/*.{js,ts,jsx,tsx}",
8-
],
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
96
}

examples/designer-demo/tailwind.config.js

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,48 @@ export default {
88
"../../packages/designer/src/**/*.{js,ts,jsx,tsx}",
99
],
1010
theme: {
11-
extend: {},
11+
extend: {
12+
colors: {
13+
border: "hsl(var(--border))",
14+
input: "hsl(var(--input))",
15+
ring: "hsl(var(--ring))",
16+
background: "hsl(var(--background))",
17+
foreground: "hsl(var(--foreground))",
18+
primary: {
19+
DEFAULT: "hsl(var(--primary))",
20+
foreground: "hsl(var(--primary-foreground))",
21+
},
22+
secondary: {
23+
DEFAULT: "hsl(var(--secondary))",
24+
foreground: "hsl(var(--secondary-foreground))",
25+
},
26+
destructive: {
27+
DEFAULT: "hsl(var(--destructive))",
28+
foreground: "hsl(var(--destructive-foreground))",
29+
},
30+
muted: {
31+
DEFAULT: "hsl(var(--muted))",
32+
foreground: "hsl(var(--muted-foreground))",
33+
},
34+
accent: {
35+
DEFAULT: "hsl(var(--accent))",
36+
foreground: "hsl(var(--accent-foreground))",
37+
},
38+
popover: {
39+
DEFAULT: "hsl(var(--popover))",
40+
foreground: "hsl(var(--popover-foreground))",
41+
},
42+
card: {
43+
DEFAULT: "hsl(var(--card))",
44+
foreground: "hsl(var(--card-foreground))",
45+
},
46+
},
47+
borderRadius: {
48+
lg: "var(--radius)",
49+
md: "calc(var(--radius) - 2px)",
50+
sm: "calc(var(--radius) - 4px)",
51+
},
52+
},
1253
},
1354
plugins: [],
1455
}

0 commit comments

Comments
 (0)