-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathtamagui.config.ts
65 lines (60 loc) · 1.32 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
import { createTamagui } from 'tamagui';
import { shorthands } from '@tamagui/shorthands';
import { customTokens, themes } from '@src/theme';
import { createInterFont } from '@tamagui/font-inter';
import { createAnimations } from '@tamagui/animations-react-native';
const headingFont = createInterFont();
const bodyFont = createInterFont({
family: 'Inter',
size: {
1: 12,
2: 14,
3: 16,
4: 18,
5: 20,
6: 22,
},
weight: {
4: '300',
5: '500',
6: '600',
7: '700',
9: '900',
},
face: {
300: { normal: 'InterLight', italic: 'InterLight-Italic' },
500: { normal: 'Inter', italic: 'Inter-Italic' },
700: { normal: 'InterSemiBold', italic: 'InterSemiBold-Italic' },
900: { normal: 'InterBold', italic: 'InterBold-Italic' },
},
});
const tamaguiConfig = createTamagui({
shorthands,
tokens: customTokens,
fonts: {
heading: headingFont,
body: bodyFont,
},
themes,
animations: createAnimations({
fast: {
damping: 20,
mass: 1.2,
stiffness: 250,
},
medium: {
damping: 10,
mass: 0.9,
stiffness: 100,
},
slow: {
damping: 20,
stiffness: 60,
},
}),
});
type Conf = typeof tamaguiConfig;
declare module 'tamagui' {
interface TamaguiCustomConfig extends Conf {}
}
export default tamaguiConfig;