-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathtamagui.config.ts
171 lines (164 loc) · 3.66 KB
/
tamagui.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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
// tamagui.config.ts
import { config as configBase } from '@tamagui/config/v3'
import { createTamagui, createTokens } from 'tamagui'
// Define color tokens for all themes
const colorTokens = createTokens({
light: {
// Background colors
background: {
default: '#FFFFFF',
secondary: '#F5F5F5',
tertiary: '#EFEFEF',
inverse: '#000000',
},
// Text colors
text: {
default: '#000000',
secondary: '#555555',
tertiary: '#888888',
inverse: '#FFFFFF',
},
// Border colors
border: {
default: '#E0E0E0',
strong: '#AAAAAA',
inverse: '#FFFFFF',
},
// Interactive colors
interactive: {
active: '#2b7fff',
hover: '#3395FF',
}
},
dark: {
// Background colors
background: {
default: '#000000',
secondary: '#1E1E1E',
tertiary: '#2A2A2A',
inverse: '#ffffff',
},
// Text colors
text: {
default: '#FFFFFF',
secondary: '#BBBBBB',
tertiary: '#888888',
inverse: '#000000',
},
// Border colors
border: {
default: '#333333',
strong: '#555555',
inverse: '#000000',
},
// Interactive colors
interactive: {
active: '#51a2ff',
hover: '#3395FF',
}
},
// New slate gray dark theme
slateDark: {
// Background colors with slate gray tones
background: {
default: '#2F3542',
secondary: '#3A4050',
tertiary: '#454C5C',
inverse: '#ffffff',
},
// Text colors
text: {
default: '#FFFFFF',
secondary: '#D1D5DB',
tertiary: '#9CA3AF',
inverse: '#2F3542',
},
// Border colors
border: {
default: '#4B5563',
strong: '#6B7280',
inverse: '#1F2937',
},
// Interactive colors
interactive: {
active: '#60A5FA',
hover: '#3B82F6',
}
},
// New hot pink theme
hotPink: {
// Background colors
background: {
default: '#fdf2f8',
secondary: '#FDF2F8',
tertiary: '#FCE7F3',
inverse: '#831843',
},
// Text colors
text: {
default: '#831843',
secondary: '#BE185D',
tertiary: '#DB2777',
inverse: '#FFFFFF',
},
// Border colors
border: {
default: '#F9A8D4',
strong: '#F472B6',
inverse: '#BF125D',
},
// Interactive colors
interactive: {
active: '#EC4899',
hover: '#DB2777',
}
}
})
// Create themes
const themes = {
light: {
background: colorTokens.light.background,
color: colorTokens.light.text,
borderColor: colorTokens.light.border,
colorHover: colorTokens.light.interactive,
},
dark: {
background: colorTokens.dark.background,
color: colorTokens.dark.text,
borderColor: colorTokens.dark.border,
colorHover: colorTokens.dark.interactive,
},
// Add the new slate gray dark theme
slateDark: {
background: colorTokens.slateDark.background,
color: colorTokens.slateDark.text,
borderColor: colorTokens.slateDark.border,
colorHover: colorTokens.slateDark.interactive,
},
// Add the new hot pink theme
hotPink: {
background: colorTokens.hotPink.background,
color: colorTokens.hotPink.text,
borderColor: colorTokens.hotPink.border,
colorHover: colorTokens.hotPink.interactive,
}
}
// Extend the base configuration with our themes
const extendedConfig = {
...configBase,
tokens: {
...configBase.tokens,
color: colorTokens
},
themes: {
...configBase.themes,
...themes
}
}
// Create the Tamagui config
export const config = createTamagui(extendedConfig)
export default config
export type Conf = typeof config
declare module 'tamagui' {
interface TamaguiCustomConfig extends Conf {}
}