-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
96 lines (92 loc) · 2.47 KB
/
App.tsx
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
import { style$, globalStyle$ } from '@vanilla-extract/css';
import { vars } from './vars';
globalStyle$('body, body *', {
all: 'unset',
boxSizing: 'border-box',
});
const tablet = 'screen and (min-width: 768px)';
const desktop = 'screen and (min-width: 1024px)';
export const App = () => (
<div
className={style$({
background: vars.color['gray-900'],
height: '100vh',
width: '100vw',
display: 'flex',
placeItems: 'center',
padding: vars.space['6x'],
})}
>
<div className={style$({
background: vars.color['gray-800'],
borderRadius: vars.borderRadius['4x'],
padding: vars.space['7x'],
'@media': {
[desktop]: {
borderRadius: vars.borderRadius['5x'],
padding: vars.space['8x'],
}
}
})}>
<div
className={style$({
display: 'flex',
alignItems: 'center',
flexDirection: 'column',
gap: vars.space['5x'],
'@media': {
[desktop]: {
gap: vars.space['6x'],
}
}
})}
>
<h1
className={style$({
fontFamily: 'body',
textAlign: 'center',
fontSize: vars.fontSize['4x'],
lineHeight: vars.lineHeight['4x'],
'@media': {
[desktop]: {
fontSize: vars.fontSize['5x'],
lineHeight: vars.lineHeight['5x'],
}
}
})}
>
<span role="img" aria-label="Waving hand">
👋
</span>
<span role="img" aria-label="vanilla-extract logo">
🧁
</span>
<span role="img" aria-label="Sprinkles logo">
🍨
</span>
</h1>
<h2
className={style$({
fontFamily: 'body',
color: vars.color['green-500'],
textAlign: 'center',
fontSize: vars.fontSize['2x'],
lineHeight: vars.lineHeight['2x'],
'@media': {
[tablet]: {
fontSize: vars.fontSize['3x'],
lineHeight: vars.lineHeight['3x'],
},
[desktop]: {
fontSize: vars.fontSize['4x'],
lineHeight: vars.lineHeight['4x'],
}
}
})}
>
Hello from vanilla-extract and Sprinkles
</h2>
</div>
</div>
</div>
);