-
Notifications
You must be signed in to change notification settings - Fork 54
Move to storybook 5 #323
Move to storybook 5 #323
Changes from 16 commits
7399740
d6bb4e0
2dd2cdd
c9bd758
3643b4e
3caddcc
bea3379
3b24543
2d1b05d
060266c
32f9694
156ce1c
9d031f8
0fda001
c42db38
8b288ac
0179b71
763c583
85cb247
05dc39b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
import 'storybook-readme/register'; | ||
import '@storybook/addon-options/register'; | ||
import '@storybook/addon-notes/register'; | ||
import '@storybook/addon-knobs/register'; |
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import React from 'react'; | ||
dr3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
import { storiesOf } from '@storybook/react'; | ||
import { withReadme } from 'storybook-readme'; | ||
import Readme from '../README.md'; | ||
import notes from '../README.md'; | ||
import Brand from './index'; | ||
|
||
storiesOf('Brand', module) | ||
.addDecorator(withReadme(Readme)) | ||
.add('default', () => <Brand brandName="Default Brand Name" />); | ||
storiesOf('Brand', module).add( | ||
'default', | ||
() => <Brand brandName="Default Brand Name" />, | ||
{ notes }, | ||
); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withReadme } from 'storybook-readme'; | ||
import Readme from '../README.md'; | ||
import notes from '../README.md'; | ||
import Copyright from './index'; | ||
|
||
storiesOf('Copyright', module) | ||
.addDecorator(withReadme(Readme)) | ||
.add('default', () => <Copyright>Getty Images</Copyright>); | ||
storiesOf('Copyright', module).add( | ||
'default', | ||
() => <Copyright>Getty Images</Copyright>, | ||
{ notes }, | ||
); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withReadme } from 'storybook-readme'; | ||
import Image from '@bbc/psammead-image'; | ||
import Readme from '../README.md'; | ||
import notes from '../README.md'; | ||
import Figure from '.'; | ||
|
||
const imageAlt = | ||
'Map of the UK displaying Syrian refugees and asylum seekers per 10000 population. Ranges from 0 to 17.'; | ||
const imageSrc = | ||
'https://ichef.bbci.co.uk/news/640/cpsprodpb/439A/production/_100960371_syrians_and_asylum_v2-nc.png'; | ||
const imageWidth = 853; | ||
storiesOf('Figure', module) | ||
.addDecorator(withReadme(Readme)) | ||
.add('containing Image', () => ( | ||
storiesOf('Figure', module).add( | ||
'containing Image', | ||
() => ( | ||
<Figure> | ||
<Image alt={imageAlt} src={imageSrc} width={imageWidth} /> | ||
</Figure> | ||
)); | ||
), | ||
{ notes }, | ||
); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withReadme } from 'storybook-readme'; | ||
import Readme from '../README.md'; | ||
import notes from '../README.md'; | ||
import { Headline, SubHeading } from './index'; | ||
|
||
storiesOf('Headline', module) | ||
.addDecorator(withReadme(Readme)) | ||
.add('default', () => <Headline>This is my headline.</Headline>); | ||
storiesOf('Headline', module).add( | ||
'default', | ||
() => <Headline>This is my headline.</Headline>, | ||
{ notes }, | ||
); | ||
|
||
storiesOf('SubHeading', module) | ||
.addDecorator(withReadme(Readme)) | ||
.add('default', () => ( | ||
storiesOf('SubHeading', module).add( | ||
'default', | ||
() => ( | ||
<SubHeading text="This is a SubHeading">This is a SubHeading</SubHeading> | ||
)); | ||
), | ||
{ notes }, | ||
); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added this as without it you lose the word 'Psammead' from the top left