-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ZTRI-32-markdown-to-jsx
- Loading branch information
Showing
24 changed files
with
98 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { addDecorator } from '@storybook/react'; | ||
import StoryRouter from 'storybook-react-router'; | ||
|
||
addDecorator(StoryRouter()); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,6 @@ | ||
import React from 'react'; | ||
import Nav from './Nav'; | ||
|
||
export default { title: 'Nav' }; | ||
|
||
export const nav = () => <Nav />; |
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,32 @@ | ||
import React from 'react'; | ||
import { screen, render } from '@testing-library/react'; | ||
import Tag from './Tag'; | ||
|
||
test('Renders text passed in as innerText', () => { | ||
render(<Tag innerText="golden unicorns defecate evenly" />); | ||
screen.getByText('golden unicorns defecate evenly'); | ||
}); | ||
|
||
test('clicking the tag calls setCurrentTags if CurrentTags includes innertext', () => { | ||
let counter = 0; | ||
const setCurrentTags = () => { | ||
counter += 1; | ||
}; | ||
const tagText = 'hello world'; | ||
render(<Tag innerText={tagText} currentTags={[tagText]} setCurrentTags={setCurrentTags} />); | ||
const tag = screen.getByText(tagText); | ||
tag.click(); | ||
expect(counter).toBe(1); | ||
}); | ||
|
||
test('clicking the tag does not call setCurrentTags if there is no currentTags', () => { | ||
let counter = 0; | ||
const setCurrentTags = () => { | ||
counter += 1; | ||
}; | ||
const tagText = 'hello world'; | ||
render(<Tag innerText={tagText} setCurrentTags={setCurrentTags} />); | ||
const tag = screen.getByText(tagText); | ||
tag.click(); | ||
expect(counter).toBe(0); | ||
}); |
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
Binary file not shown.
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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
@font-face { | ||
font-family: 'DINCondensed-Bold'; | ||
src: local('DINCondensed-Bold'), url(./fonts/DINCondensed-Bold.ttf), format('ttf'); | ||
font-family: 'DIN'; | ||
src: local('DINCondensed-Bold'), url(./fonts/DINCondensed-Bold.ttf) format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
src: local('Roboto-Regular'), url(./fonts/Roboto-Regular.ttf) format('truetype'); | ||
} |
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 |
---|---|---|
@@ -1,10 +1,17 @@ | ||
// Colours | ||
export const sand = '#ffcb74'; | ||
export const olive = '#b1b493'; | ||
export const ocean = '#4f8a8b'; | ||
export const night = '#07031a'; | ||
export const granite = '#474747'; | ||
export const offWhite = '#fbf9fa'; | ||
|
||
// dimensions | ||
export const medButtonHeight = '42px'; | ||
export const smallButtonHeight = '38px'; | ||
export const titleBarVerticalPadding = '8px'; | ||
export const mainContainerWidth = '700px'; | ||
|
||
// font-families | ||
export const headerFont = 'DIN, sans-serif'; | ||
export const standardFont = 'Roboto, sans-serif'; |