This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtamagui.config.ts
104 lines (91 loc) · 1.89 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
import { createInterFont } from '@tamagui/font-inter';
import { shorthands } from '@tamagui/shorthands';
import { themes, tokens } from '@tamagui/themes';
import { createTamagui, styled, Text, YStack } from 'tamagui';
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 headingFont = createInterFont();
const bodyFont = createInterFont();
export const Container = styled(YStack, {
padding: 24,
maxWidth: 960,
});
export const Main = styled(YStack, {
flex: 1,
padding: 16,
justifyContent: 'center',
alignItems: 'center',
});
export const Title = styled(Text, {
fontSize: 60,
fontWeight: 'bold',
});
export const Subtitle = styled(Text, {
color: '#38434D',
fontSize: 36,
});
export const Button = styled(YStack, {
alignItems: 'center',
backgroundColor: '#6366F1',
borderRadius: 24,
justifyContent: 'center',
padding: 16,
shadowColor: '#000',
shadowOffset: {
height: 2,
width: 0,
},
shadowOpacity: 0.25,
shadowRadius: 3.84,
hoverStyle: {
backgroundColor: '#5a5fcf',
},
});
export const ButtonText = styled(Text, {
color: '#FFFFFF',
fontSize: 16,
fontWeight: '600',
textAlign: 'center',
});
const config = createTamagui({
light: {
color: {
background: 'gray',
text: 'black',
},
},
defaultFont: 'body',
animations,
shouldAddPrefersColorThemes: true,
themeClassNameOnRoot: true,
shorthands,
fonts: {
body: bodyFont,
heading: headingFont,
},
themes,
tokens,
});
type AppConfig = typeof config;
declare module 'tamagui' {
interface TamaguiCustomConfig extends AppConfig {}
}
export default config;