-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathtamagui.config.ts
84 lines (78 loc) · 1.94 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
import { radius, size, space, zIndex } from '@tamagui/themes'
import { configInput, fontOpenSans, fontRaleway, hexColors } from '@package/ui/src/config/tamagui.config'
import { createMedia, createTamagui, createTokens } from 'tamagui'
export const tokensInput = {
color: hexColors,
radius: {
...radius,
button: 16,
},
size,
zIndex,
space,
} as const
const tokens = createTokens({
...tokensInput,
size: {
...tokensInput.size,
buttonHeight: 56,
},
color: {
...hexColors, // Re-use existing colors for positive/warnings etc.
background: hexColors.white,
'grey-50': '#F5F7F8',
'grey-100': '#EBF1F3',
'grey-200': '#E5E9EC',
'grey-300': '#D7DCE0',
'grey-400': '#BFC5CB',
'grey-500': '#839196',
'grey-600': '#6D7581',
'grey-700': '#656974',
'grey-800': '#464B56',
'grey-900': '#222222',
'primary-50': '#F7F7FF',
'primary-100': '#EEF0FE',
'primary-200': '#DADEFF',
'primary-300': '#ACB4FB',
'primary-400': '#7A88FF',
'primary-500': '#5A33F6',
'primary-600': '#2233C9',
'primary-700': '#202EA7',
'primary-800': '#141E80',
'primary-900': '#131C66',
'feature-300': '#DFA6FF',
'feature-400': '#CA79FF',
'feature-500': '#A000F8',
'feature-600': '#8600D1',
'feature-700': '#7E00CC',
},
})
const config = createTamagui({
...configInput,
tokens,
fonts: {
default: fontOpenSans,
heading: fontRaleway,
// Somehow adding body font gives build errors?!
body: fontOpenSans,
},
themes: {
light: {
...tokens.color,
tableBackgroundColor: tokens.color['grey-50'],
tableBorderColor: '#ffffff',
idCardBackground: '#F1F2F0',
},
},
media: createMedia({
short: {
maxHeight: 756,
},
}),
})
type ConfIg = typeof config
declare module 'tamagui' {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface TamaguiCustomConfig extends ConfIg {}
}
export default config