diff --git a/src/components/Text.spec.tsx b/src/components/Text.spec.tsx index c6b92143d..6cab969e3 100644 --- a/src/components/Text.spec.tsx +++ b/src/components/Text.spec.tsx @@ -1,4 +1,4 @@ -import { Paragraph, H2 } from './Text'; +import { Paragraph, H2, H3, H4 } from './Text'; import renderer from 'react-test-renderer'; describe('Text', () => { @@ -11,7 +11,11 @@ describe('Text', () => { it('matches heading snapshot', () => { const tree = renderer.create( -

This is a heading

+ <> +

This is an h2

+

This is an h3

+

This is an h4

+ ).toJSON(); expect(tree).toMatchSnapshot(); }); diff --git a/src/components/Text.stories.tsx b/src/components/Text.stories.tsx index 05a96f07f..9d2c4417e 100644 --- a/src/components/Text.stories.tsx +++ b/src/components/Text.stories.tsx @@ -1,9 +1,11 @@ -import { H2, Paragraph } from "./Text"; +import { H2, H3, H4, Paragraph } from "./Text"; export const PText = () => <> Body text ; -export const Heading = () => <> +export const Headings = () => <>

Heading text

+

Heading text

+

Heading text

; diff --git a/src/components/Text.tsx b/src/components/Text.tsx index a911230c7..5a3fa7f1b 100644 --- a/src/components/Text.tsx +++ b/src/components/Text.tsx @@ -7,6 +7,21 @@ export const H2 = styled.h2` font-weight: 700; `; +export const H3 = styled.h3` + color: ${palette.neutralDarker}; + font-size: 1.4rem; + font-weight: 700; + line-height: 2.4rem; +`; + +export const H4 = styled.h4` + color: ${palette.neutralThin}; + font-size: 1.4rem; + font-weight: 700; + line-height: 2rem; + text-transform: uppercase; +`; + export const Paragraph = styled.p` color: ${palette.neutralDarker}; font-size: 1.8rem;