-
Notifications
You must be signed in to change notification settings - Fork 42
/
index.js
54 lines (49 loc) · 1.03 KB
/
index.js
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
import {
fonts,
spacing,
editionBreakpoints
} from "@times-components/styleguide";
const mediumBreakpointStyles = {
container: {
flex: 1,
paddingVertical: spacing(3),
paddingHorizontal: spacing(6)
},
headline: {
fontFamily: fonts.headline,
fontSize: 40,
lineHeight: 40,
marginBottom: 0
},
imageContainer: {
width: "100%",
marginBottom: spacing(2)
}
};
const wideBreakpointStyles = {
...mediumBreakpointStyles,
container: {
flex: 1,
paddingVertical: spacing(3),
paddingHorizontal: spacing(4)
},
imageContainer: {
width: "100%",
marginBottom: spacing(3)
}
};
const hugeBreakpointStyles = {
...wideBreakpointStyles,
headline: {
fontFamily: fonts.headline,
fontSize: 45,
lineHeight: 45,
marginBottom: 0
}
};
const stylesResolver = {
[editionBreakpoints.medium]: mediumBreakpointStyles,
[editionBreakpoints.wide]: wideBreakpointStyles,
[editionBreakpoints.huge]: hugeBreakpointStyles
};
export default breakpoint => stylesResolver[breakpoint];