-
Notifications
You must be signed in to change notification settings - Fork 42
/
shared.js
49 lines (46 loc) · 1.23 KB
/
shared.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
import styleguide, {
scales,
fonts,
tabletWidth
} from "@times-components/styleguide";
import { fontSize, margins } from "./drop-cap-sizes";
const sharedStyles = (dropCapFont = "dropCap", scale = scales.medium) => {
const { colours, fontFactory, spacing } = styleguide({ scale });
const dropCapMargins = margins(dropCapFont, scale);
const dropCapFontSize = fontSize(dropCapFont, scale);
return {
articleMainContentRow: {
paddingLeft: spacing(2),
paddingRight: spacing(2)
},
articleMainContentRowTablet: {
alignSelf: "center",
width: tabletWidth
},
articleTextElement: {
...fontFactory({
font: "body",
fontSize: "bodyMobile"
}),
color: colours.functional.primary,
marginBottom: spacing(5)
},
dropCapContainer: {
flexDirection: "row",
flexWrap: "wrap"
},
dropCapContainerTablet: {
alignSelf: "center",
width: tabletWidth
},
dropCapTextElement: {
color: colours.functional.primary,
fontFamily: fonts[dropCapFont],
fontSize: dropCapFontSize,
marginBottom: dropCapMargins.bottom,
marginRight: spacing(1),
marginTop: dropCapMargins.top
}
};
};
export default sharedStyles;