-
Notifications
You must be signed in to change notification settings - Fork 9
/
common.styles.js
57 lines (48 loc) 路 1.16 KB
/
common.styles.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
55
56
57
import React from "react";
import styled from "styled-components";
import tokens from "@paprika/tokens";
import stylers from "@paprika/stylers";
// Common Storybook story styles
export const Story = styled.div`
padding: ${stylers.spacer(3)};
h1 {
margin-top: 0;
}
`;
export const CenteredStory = styled.div`
${stylers.alignMiddle}
align-items: center;
display: flex;
justify-content: center;
min-height: 100vh;
width: 100%;
`;
export const Rule = styled.hr`
border: none;
border-bottom: 1px solid ${tokens.border.color};
margin: ${stylers.spacer(4)} 0;
`;
export const Small = styled.small`
color: ${tokens.color.blackLighten40};
`;
export const Tagline = styled.div`
color: ${tokens.textColor.subtle};
font-style: italic;
`;
const LargeGap = styled.div`
height: 120px;
`;
const SmallGap = styled.div`
height: ${stylers.spacer(2)};
`;
const InlineGap = styled.div`
display: inline-flex;
width: ${tokens.space};
`;
export const Gap = styled.div`
height: ${stylers.spacer(5)};
`;
Gap.Large = LargeGap;
Gap.Small = SmallGap;
Gap.Inline = InlineGap;
export const breaklines = num => [...Array(num).keys()].map(index => <br key={index} />);