|
1 | 1 | import styled from 'styled-components';
|
2 | 2 |
|
3 | 3 | const H1 = styled.h1`
|
4 |
| - color: var(--color-pink); |
5 |
| - font-weight: 200; |
6 |
| - line-height: var(--space-triple); |
| 4 | + font-family: ${({ theme }) => theme.fonts.heading}; |
| 5 | + color: ${({ theme }) => theme.colors.primary}; |
| 6 | + font-weight: ${({ theme }) => theme.fontWeights.light}; |
| 7 | + font-size: ${({ theme }) => theme.fontSizes.xxxLarge}; |
| 8 | + line-height: ${({ theme }) => theme.lineHeights.heading}; |
| 9 | + margin-bottom: ${({ theme }) => theme.space.large}; |
7 | 10 | `;
|
8 | 11 |
|
9 | 12 | const H2 = styled.h2`
|
10 |
| - color: ${props => { |
11 |
| - if (props.color === "light-blue") { |
12 |
| - return 'var(--color-light-blue)'; |
13 |
| - } else if (props.color === "dark-blue") { |
14 |
| - return 'var(--color-dark-blue)'; |
15 |
| - } else if (props.color === "pink") { |
16 |
| - return 'var(--color-pink)'; |
17 |
| - } else { |
18 |
| - return 'var(--input-color)'; |
19 |
| - } |
20 |
| - }}; |
| 13 | + color: ${({ color, theme }) => ((color) ? theme.colors[color] : theme.colors.primary)}; |
| 14 | + font-family: ${({ theme }) => theme.fonts.heading}; |
| 15 | + font-weight: ${({ theme }) => theme.fontWeights.body}; |
| 16 | + font-size: ${({ theme }) => theme.fontSizes.xLarge}; |
| 17 | + line-height: ${({ theme }) => theme.lineHeights.heading}; |
| 18 | + margin-bottom: ${({ theme }) => theme.space.large}; |
21 | 19 | `;
|
22 | 20 |
|
23 | 21 | const H3 = styled.h3`
|
24 |
| - color: var(--color-light-blue); |
| 22 | + color: ${({ color, theme }) => (color) ? theme.colors[color] : theme.colors.primary}; |
| 23 | + font-family: ${({ theme }) => theme.fonts.heading}; |
| 24 | + font-weight: ${({ theme }) => theme.fontWeights.bold}; |
| 25 | + font-size: ${({ theme }) => theme.fontSizes.medium}; |
| 26 | + line-height: ${({ theme }) => theme.lineHeights.heading}; |
| 27 | + margin-bottom: ${({ theme }) => theme.space.medium}; |
25 | 28 | `;
|
26 | 29 |
|
27 | 30 | const H4 = styled.h4`
|
28 |
| - color: var(--color-dark-blue); |
29 |
| - margin-bottom: var(--space-half); |
| 31 | + color: ${({ color, theme }) => (color) ? theme.colors[color] : theme.colors.primary}; |
| 32 | + font-family: ${({ theme }) => theme.fonts.heading}; |
| 33 | + font-weight: ${({ theme }) => theme.fontWeights.bold}; |
| 34 | + font-size: ${({ theme }) => theme.fontSizes.small}; |
| 35 | + line-height: ${({ theme }) => theme.lineHeights.heading}; |
| 36 | + margin-bottom: ${({ theme }) => theme.space.small}; |
| 37 | + text-transform: uppercase; |
| 38 | + letter-spacing: 1px; |
30 | 39 | `;
|
31 | 40 |
|
32 | 41 | export { H1, H2, H3, H4 };
|
0 commit comments