forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelements.ts
More file actions
67 lines (62 loc) · 1.54 KB
/
elements.ts
File metadata and controls
67 lines (62 loc) · 1.54 KB
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
import CommonStats from '@codesandbox/common/lib/components/Stats';
import { CenteredText } from '@codesandbox/common/lib/components/Stats/Stat/elements';
import css from '@styled-system/css';
import styled from 'styled-components';
export const Container = styled.div(
css({
paddingX: 4,
})
);
export const Title = styled.h1(
css({
fontSize: 3,
fontWeight: 'medium',
margin: 0,
marginBottom: 1,
})
);
export const Description = styled.h2(
css({
fontSize: 2,
fontWeight: 'normal',
color: 'sideBar.foreground',
marginBottom: 4,
})
);
export const Stats = styled(CommonStats)(
css({
fontSize: 2,
color: 'grays.400',
marginBottom: 2,
// ouch ouch ouch, modifying a child of
// a common element is just pure evil
// this will definitely break on the
// slightest touch to the Stats component
// TODO: Refactor stats component to accept
// justify as an input
[CenteredText]: {
justifyContent: 'start',
},
})
);
export const Button = styled.a(
css({
transition: '0.3s ease background-color',
backgroundColor: theme => (theme.light ? 'grays.200' : 'grays.500'),
padding: 2,
display: 'block',
color: theme => (theme.light ? 'grays.800' : 'white'),
border: 'none',
outline: 'none',
borderRadius: 2,
width: '100%',
fontSize: 3,
boxSizing: 'border-box',
cursor: 'pointer',
textDecoration: 'none',
textAlign: 'center',
':hover': {
backgroundColor: theme => (theme.light ? 'grays.300' : 'grays.600'),
},
})
);