-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtamagui.config.ts
126 lines (122 loc) · 2.16 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
import { createTamagui } from 'tamagui'
import { shorthands } from '@tamagui/shorthands'
import { themes, tokens } from '@tamagui/themes'
import { createMedia } from '@tamagui/react-native-media-driver'
import { createAnimations } from '@tamagui/animations-react-native'
const animations = createAnimations({
bouncy: {
type: 'spring',
damping: 10,
mass: 0.9,
stiffness: 100,
},
lazy: {
type: 'spring',
damping: 20,
stiffness: 60,
},
quick: {
type: 'spring',
damping: 20,
mass: 1.2,
stiffness: 250,
},
})
const firaCodeFont = {
family: 'Fira Code',
size: {
1: 12,
2: 14,
3: 15,
4: 16,
5: 18,
6: 20,
7: 24,
8: 28,
9: 32,
10: 40,
11: 48,
12: 56,
13: 64,
14: 72,
15: 80,
16: 96,
},
lineHeight: {
1: 17,
2: 22,
3: 25,
4: 28,
5: 32,
6: 36,
7: 40,
8: 44,
9: 48,
10: 56,
11: 64,
12: 72,
13: 80,
14: 88,
15: 96,
16: 112,
},
weight: {
4: '400',
7: '700',
},
letterSpacing: {
4: 0,
7: -1,
},
}
const config = createTamagui({
animations,
defaultTheme: 'light',
shouldAddPrefersColorThemes: true,
themeClassNameOnRoot: true,
shorthands,
fonts: {
heading: firaCodeFont,
body: firaCodeFont,
},
themes: {
light: {
background: '#FAFAFA',
color: '#000000',
},
dark: {
background: '#000000',
color: '#FFFFFF',
},
dracula: {
background: '#282a36',
color: '#f8f8f2',
},
neon: {
background: '#2b213a',
color: '#ffffff',
},
mirage: {
background: '#1f2430',
color: '#cbccc6',
},
},
tokens,
media: createMedia({
xs: { maxWidth: 660 },
sm: { maxWidth: 800 },
md: { maxWidth: 1020 },
lg: { maxWidth: 1280 },
xl: { maxWidth: 1420 },
xxl: { maxWidth: 1600 },
gtXs: { minWidth: 660 + 1 },
gtSm: { minWidth: 800 + 1 },
gtMd: { minWidth: 1020 + 1 },
gtLg: { minWidth: 1280 + 1 },
short: { maxHeight: 820 },
tall: { minHeight: 820 },
hoverNone: { hover: 'none' },
pointerCoarse: { pointer: 'coarse' },
}),
})
export default config