-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #211 from reapit/develop
Merge dev to master
- Loading branch information
Showing
18 changed files
with
359 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './v2/src' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './typography' |
47 changes: 47 additions & 0 deletions
47
src/v2/src/components/typography/__snapshots__/h1.test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`H1 should match snapshot 1`] = ` | ||
<StyledComponent | ||
forwardedComponent={ | ||
Object { | ||
"$$typeof": Symbol(react.forward_ref), | ||
"_foldedDefaultProps": Object { | ||
"theme": Object { | ||
"h1": Object { | ||
"color": "black", | ||
}, | ||
}, | ||
}, | ||
"attrs": Array [], | ||
"componentStyle": ComponentStyle { | ||
"componentId": "sc-bdVaJa", | ||
"isStatic": false, | ||
"rules": Array [ | ||
" | ||
color: ", | ||
[Function], | ||
" | ||
font-size: 1em; | ||
", | ||
], | ||
}, | ||
"displayName": "styled.h1", | ||
"foldedComponentIds": Array [], | ||
"render": [Function], | ||
"styledComponentId": "sc-bdVaJa", | ||
"target": "h1", | ||
"toString": [Function], | ||
"warnTooManyClasses": [Function], | ||
"withComponent": [Function], | ||
} | ||
} | ||
forwardedRef={null} | ||
theme={ | ||
Object { | ||
"h1": Object { | ||
"color": "black", | ||
}, | ||
} | ||
} | ||
/> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import { shallow } from 'enzyme' | ||
import { H1 } from './h1' | ||
|
||
describe('H1', () => { | ||
it('should match snapshot', () => { | ||
const wrapper = shallow(<H1 />) | ||
expect(wrapper).toMatchSnapshot() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import styled from 'styled-components' | ||
import { TYPOGRAPHY_TITLE_FONT_COLOR } from '../../styles' | ||
|
||
export const H1 = styled.h1` | ||
color: ${props => props.theme.h1.color} | ||
font-size: 1em; | ||
` | ||
|
||
H1.defaultProps = { | ||
theme: { | ||
h1: { | ||
color: TYPOGRAPHY_TITLE_FONT_COLOR | ||
} | ||
} | ||
} | ||
|
||
export default H1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as H1 } from './h1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './components' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
export interface Theme { | ||
h1: { | ||
color: string | ||
} | ||
} | ||
|
||
// Typography | ||
export const TYPOGRAPHY_TITLE_FONT_COLOR = 'black' | ||
export const TYPOGRAPHY_TITLE_FONT_WEIGHT = 600 | ||
export const TYPOGRAPHY_TITLE_MARGIN_TOP = '1.2rem' | ||
export const TYPOGRAPHY_TITLE_MARGIN_BOTTOM = '0.5rem' | ||
|
||
// Colors | ||
export const WHITE = '#fff' | ||
export const BLACK = '#12263f' | ||
export const GREY_DARK = '#556986' | ||
export const GREY = '#95aac9' | ||
export const GREY_LIGHTER = '#eef3f9' | ||
export const GREY_LIGHTEST = '#f9fbfd' | ||
|
||
export const GREEN_LIGHTER = '#acf2bd' | ||
export const GREEN_LIGHTEST = '#e6ffed' | ||
export const RED_LIGHTER = '#fdb8c0' | ||
export const RED_LIGHTEST = '#ffeef0' | ||
|
||
export const REAPIT_DARK_BLUE = '#262f69' | ||
export const REAPIT_DARK_BLUE_DARKENED = '#1e2554' | ||
export const REAPIT_MID_BLUE = '#0061a8' | ||
export const REAPIT_LIGHT_BLUE = '#23a4de' | ||
export const REAPIT_LIGHTEST_BLUE = '#7bc9eb' | ||
export const REAPIT_LIGHTEST_BLUE_LIGHTENED = '#d4edf8' | ||
|
||
export const REAPIT_ORANGE = '#ec631b' | ||
export const REAPIT_LIME = '#cddb00' | ||
export const REAPIT_TEAL = '#006580' | ||
export const REAPIT_PLUMB = '#7a2c81' | ||
export const REAPIT_PURPLE = '#a4185c' | ||
export const REAPIT_GOLD = '#ffb71b' | ||
export const REAPIT_GREEN = '#a0c862' | ||
export const REAPIT_RED = '#d3033d' | ||
|
||
// Font | ||
export const FAMILY_SANS_SERIF = 'Roboto, Helvetica, Arial, sans-serif' | ||
export const FONT_SIZE = '14px' | ||
// Layout | ||
export const LAYOUT_BASE = '1rem' | ||
// Generic layout values that scale to rem base | ||
export const LAYOUT_QUARTER = 'calc(1rem / 4)' | ||
export const LAYOUT_THIRD = 'calc(1rem / 3)' | ||
export const LAYOUT_HALF = 'calc(1rem / 2)' | ||
export const LAYOUT_TWO_THIRD = 'calc(1rem * 0.67)' | ||
export const LAYOUT_THREE_QUARTER = 'calc(1rem * 0.75)' | ||
export const LAYOUT_ONE_QUARTER = 'calc(1rem * 1.25)' | ||
export const LAYOUT_ONE_HALF = 'calc(1rem * 1.5)' | ||
export const LAYOUT_DOUBLE = 'calc(1rem * 2)' | ||
export const LAYOUT_TWO_HALF = 'calc(1rem * 2.5)' | ||
export const LAYOUT_TRIPLE = 'calc(1rem * 3)' | ||
export const LAYOUT_QUADRUPLE = 'calc(1rem * 4)' | ||
export const LAYOUT_SEXTUPLE = 'calc(1rem * 6)' | ||
export const MENU_WIDTH = '18rem' | ||
export const PAGE_CONTAINER = 'calc(100vw - 18rem)' |
Oops, something went wrong.