-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy paththeme.ts
105 lines (96 loc) · 2.02 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import { extendTheme, type ThemeConfig } from '@chakra-ui/react'
import { StyleFunctionProps } from '@chakra-ui/theme-tools'
const config: ThemeConfig = {
initialColorMode: 'light',
useSystemColorMode: false,
}
// const breakpoints = {
// sm: '320px',
// md: '768px',
// lg: '960px',
// xl: '1200px',
// '2xl': '1536px',
// }
const colors = {
dark: {
border: 'rgba(255, 255, 255, 0.2)',
bg: '#15232d',
overlay: 'rgba(46, 46, 58, 0.05)',
modal: 'rgba(255, 255, 255, 0.05)',
},
light: {
border: 'rgba(46, 46, 58, 0.2)',
bg: '#fff',
overlay: 'rgba(46, 46, 58, 0.05)',
modal: '#fff'
}
}
const Button = {
baseStyle: {
textTransform: 'uppercase',
borderRadius: 0,
},
variants: {
solid: ({ colorMode }: StyleFunctionProps) => ({
fontSize: '10px',
border: `1px solid ${colors[colorMode].border}`,
background: 'transparent'
})
}
}
const Card = {
// The styles all Cards have in common
baseStyle: ({ colorMode }: StyleFunctionProps) => ({
border: `1px solid ${colors[colorMode].border}`,
}),
}
const Modal = {
baseStyle: ({ colorMode }: StyleFunctionProps) => ({
overlay: {
// bg: colors[colorMode].overlay,
backdropFilter: 'blur(3px)',
},
dialog: {
bg: colors[colorMode].modal,
}
})
}
const Input = {
sizes: {
md: {
field: {
borderRadius: 0
}
}
}
}
const customTheme = extendTheme({
config,
fonts: {
body: 'Dogica Pixel, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif',
},
styles: {
global: {
body: {
WebkitFontSmoothing: 'antialiased',
MozOsxFontSmoothing: 'grayscale',
fontSize: '10px',
transition: 'background 0.25s ease-in-out',
},
ul: {
listStyle: 'none'
},
li: {
listStyle: 'none'
}
},
},
components: {
Card,
Button,
Modal,
Input
},
// breakpoints
})
export default customTheme