Skip to content

Commit 0c5bff5

Browse files
committed
styles: add typography
1 parent 8686ae5 commit 0c5bff5

File tree

3 files changed

+87
-15
lines changed

3 files changed

+87
-15
lines changed

app/src/components/common/base.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import Chevrons from 'assets/icons/chevrons.svg';
22
import { styled } from 'components/theme';
33

4+
//
5+
// Misc
6+
//
7+
48
export const Background = styled.div`
59
min-height: 100vh;
610
color: ${props => props.theme.colors.white};
711
background-color: ${props => props.theme.colors.blue};
8-
font-family: ${props => props.theme.fonts.regular};
12+
font-family: ${props => props.theme.fonts.open.regular};
913
font-size: ${props => props.theme.sizes.m};
1014
`;
1115

@@ -20,6 +24,10 @@ export const Pill = styled.span`
2024
border-radius: 40px;
2125
`;
2226

27+
//
28+
// Button
29+
//
30+
2331
interface ButtonProps {
2432
primary?: boolean;
2533
ghost?: boolean;
@@ -53,6 +61,10 @@ export const Button = styled.button<ButtonProps>`
5361
}
5462
`;
5563

64+
//
65+
// Radio Button
66+
//
67+
5668
interface RadioButtonProps {
5769
checked?: boolean;
5870
}
@@ -70,6 +82,10 @@ export const RadioButton = styled.span<RadioButtonProps>`
7082
}
7183
`;
7284

85+
//
86+
// List
87+
//
88+
7389
/**
7490
* the react-virtualized list doesn't play nice with the bootstrap row -15px
7591
* margin. We need to manually offset the container and remove the
@@ -87,6 +103,10 @@ export const ListContainer = styled.div`
87103
}
88104
`;
89105

106+
//
107+
// Range
108+
//
109+
90110
/**
91111
* the input[type=range] element. Vendor-specific rules for pseudo
92112
* elements cannot be mixed. As such, there are no shared styles for focus or

app/src/components/common/text.tsx

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,46 @@ interface BlockProps {
44
block?: boolean;
55
}
66

7+
export const HeaderOne = styled.h1`
8+
font-family: ${props => props.theme.fonts.work.medium};
9+
font-size: ${props => props.theme.sizes.xxl};
10+
line-height: 52px;
11+
`;
12+
13+
export const HeaderTwo = styled.h2`
14+
font-family: ${props => props.theme.fonts.open.regular};
15+
font-size: ${props => props.theme.sizes.m};
16+
line-height: 26px;
17+
`;
18+
19+
export const HeaderThree = styled.h3`
20+
font-family: ${props => props.theme.fonts.open.regular};
21+
font-size: ${props => props.theme.sizes.l};
22+
line-height: 30px;
23+
letter-spacing: 2.7px;
24+
text-transform: uppercase;
25+
`;
26+
27+
export const HeaderFour = styled.h4`
28+
font-family: ${props => props.theme.fonts.open.semiBold};
29+
font-size: ${props => props.theme.sizes.s};
30+
line-height: 20px;
31+
text-transform: uppercase;
32+
`;
33+
34+
export const Small = styled.p`
35+
font-size: ${props => props.theme.sizes.s};
36+
line-height: 19px;
37+
`;
38+
39+
export const Jumbo = styled.span`
40+
font-size: ${props => props.theme.sizes.xl};
41+
line-height: 38px;
42+
`;
43+
744
export const Title = styled.div`
845
font-size: ${props => props.theme.sizes.s};
9-
font-family: ${props => props.theme.fonts.semiBold};
46+
font-family: ${props => props.theme.fonts.open.semiBold};
1047
text-transform: uppercase;
1148
letter-spacing: 0;
1249
line-height: 19px;
@@ -32,7 +69,7 @@ export const XLargeText = styled.span<BlockProps>`
3269
`;
3370

3471
export const PageTitle = styled.h2`
35-
font-family: ${props => props.theme.fonts.light};
72+
font-family: ${props => props.theme.fonts.open.light};
3673
font-size: ${props => props.theme.sizes.l};
3774
text-align: center;
3875
text-transform: uppercase;
@@ -41,6 +78,6 @@ export const PageTitle = styled.h2`
4178
`;
4279

4380
export const H3Text = styled.h3`
44-
font-family: ${props => props.theme.fonts.bold};
81+
font-family: ${props => props.theme.fonts.open.bold};
4582
font-size: ${props => props.theme.sizes.m};
4683
`;

app/src/components/theme.tsx

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
import React from 'react';
2-
32
import emotionStyled, { CreateStyled } from '@emotion/styled/macro';
43
import { ThemeProvider as EmotionThemeProvider } from 'emotion-theming';
54

65
export interface Theme {
76
fonts: {
8-
light: string;
9-
regular: string;
10-
semiBold: string;
11-
bold: string;
12-
extraBold: string;
7+
open: {
8+
light: string;
9+
regular: string;
10+
semiBold: string;
11+
bold: string;
12+
extraBold: string;
13+
};
14+
work: {
15+
light: string;
16+
medium: string;
17+
semiBold: string;
18+
};
1319
};
1420
sizes: {
1521
s: string;
1622
m: string;
1723
l: string;
1824
xl: string;
25+
xxl: string;
1926
};
2027
colors: {
2128
blue: string;
@@ -35,17 +42,25 @@ export interface Theme {
3542

3643
const theme: Theme = {
3744
fonts: {
38-
light: "'OpenSans Light'",
39-
regular: "'OpenSans Regular'",
40-
semiBold: "'OpenSans SemiBold'",
41-
bold: "'OpenSans Bold'",
42-
extraBold: "'OpenSans ExtraBold'",
45+
open: {
46+
light: "'OpenSans Light'",
47+
regular: "'OpenSans Regular'",
48+
semiBold: "'OpenSans SemiBold'",
49+
bold: "'OpenSans Bold'",
50+
extraBold: "'OpenSans ExtraBold'",
51+
},
52+
work: {
53+
light: "'WorkSans Light'",
54+
medium: "'WorkSans Medium'",
55+
semiBold: "'WorkSans SemiBold'",
56+
},
4357
},
4458
sizes: {
4559
s: '14px',
4660
m: '18px',
4761
l: '22px',
4862
xl: '27px',
63+
xxl: '45px',
4964
},
5065
colors: {
5166
blue: '#252f4a',

0 commit comments

Comments
 (0)