-
Notifications
You must be signed in to change notification settings - Fork 548
Expand file tree
/
Copy pathtailwind.config.ts
More file actions
65 lines (63 loc) · 2.47 KB
/
tailwind.config.ts
File metadata and controls
65 lines (63 loc) · 2.47 KB
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
58
59
60
61
62
63
64
65
import type { Config } from "tailwindcss";
import { breakpointsTokens } from "./src/theme/tokens/breakpoints";
import { HtmlDataAttribute } from "./src/types/enum";
import { creatColorChannel, createTailwinConfg } from "./src/utils/theme";
export default {
darkMode: ["selector", `[${HtmlDataAttribute.ThemeMode}='dark']`],
content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"],
theme: {
fontFamily: createTailwinConfg("typography.fontFamily"),
extend: {
colors: {
// slash admin theme tokens
primary: creatColorChannel("colors.palette.primary"),
success: creatColorChannel("colors.palette.success"),
warning: creatColorChannel("colors.palette.warning"),
error: creatColorChannel("colors.palette.error"),
info: creatColorChannel("colors.palette.info"),
gray: creatColorChannel("colors.palette.gray"),
common: creatColorChannel("colors.common"),
text: creatColorChannel("colors.text"),
bg: creatColorChannel("colors.background"),
action: createTailwinConfg("colors.action"),
// shadcn ui theme tokens
background: "var(--background)",
foreground: "var(--foreground)",
card: "var(--card)",
cardForeground: "var(--card-foreground)",
popover: "var(--popover)",
popoverForeground: "var(--popover-foreground)",
primaryForeground: "var(--primary-foreground)",
secondary: "var(--secondary)",
secondaryForeground: "var(--secondary-foreground)",
muted: "var(--muted)",
mutedForeground: "var(--muted-foreground)",
accent: "var(--accent)",
accentForeground: "var(--accent-foreground)",
destructive: "var(--destructive)",
border: "var(--border)",
input: "var(--input)",
ring: "var(--ring)",
chart1: "var(--chart-1)",
chart2: "var(--chart-2)",
chart3: "var(--chart-3)",
chart4: "var(--chart-4)",
chart5: "var(--chart-5)",
sidebar: "var(--sidebar)",
sidebarForeground: "var(--sidebar-foreground)",
sidebarPrimary: "var(--sidebar-primary)",
sidebarPrimaryForeground: "var(--sidebar-primary-foreground)",
sidebarAccent: "var(--sidebar-accent)",
sidebarAccentForeground: "var(--sidebar-accent-foreground)",
sidebarBorder: "var(--sidebar-border)",
sidebarRing: "var(--sidebar-ring)",
},
opacity: createTailwinConfg("opacity"),
borderRadius: createTailwinConfg("borderRadius"),
boxShadow: createTailwinConfg("shadows"),
spacing: createTailwinConfg("spacing"),
zIndex: createTailwinConfg("zIndex"),
screens: breakpointsTokens,
},
},
} satisfies Config;