-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.ts
57 lines (53 loc) · 1.3 KB
/
theme.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 {
extendTheme,
theme as defaultTheme,
defineStyleConfig,
} from "@chakra-ui/react";
import { mode, StyleFunctionProps } from "@chakra-ui/theme-tools";
const Button = defineStyleConfig({
variants: {
destructive: (props: StyleFunctionProps) => ({
bgColor: mode("red.100", "red.300")(props),
_hover: {
bgColor: mode("red.200", "red.400")(props),
},
}),
},
});
const Kbd = defineStyleConfig({
variants: {
destructive: (props: StyleFunctionProps) =>
Button.variants?.destructive(props) || {},
},
});
const theme = extendTheme({
config: {
initialColorMode: "dark",
},
colors: {
background: {
primary: defaultTheme.colors.gray[50],
secondary: defaultTheme.colors.gray[100],
primaryDark: defaultTheme.colors.gray[800],
secondaryDark: defaultTheme.colors.gray[700],
},
text: {
default: defaultTheme.colors.gray[800],
defaultDark: defaultTheme.colors.whiteAlpha[900],
},
},
styles: {
global: (props: StyleFunctionProps) => ({
body: {
color: mode("text.default", "text.defaultDark")(props),
background: mode("background.primary", "background.primaryDark")(props),
minH: "100vh",
},
}),
},
components: {
Button,
Kbd,
},
});
export default theme;