generated from wednesday-solutions/react-template
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
56 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
import { Meta, Story } from '@storybook/react'; | ||
import { Clickable } from '../index'; | ||
|
||
export default { | ||
title: 'Clickable', | ||
component: Clickable | ||
}; | ||
|
||
const ClickableTemplate = (args) => <Clickable {...args} />; | ||
|
||
export const ClickableStoryComponent = ClickableTemplate.bind({}); | ||
ClickableStoryComponent.args = {}; |
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,19 @@ | ||
import React from 'react'; | ||
import { MemoryRouter } from 'react-router-dom'; | ||
import Header from '../index'; | ||
|
||
export default { | ||
title: 'Header', | ||
component: Header | ||
}; | ||
|
||
const HeaderTemplate = (args) => ( | ||
<MemoryRouter> | ||
<Header {...args} /> | ||
</MemoryRouter> | ||
); | ||
|
||
export const HeaderStoryComponent = HeaderTemplate.bind({}); | ||
HeaderStoryComponent.args = { | ||
id: 'Header' | ||
}; |
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,28 +1,27 @@ | ||
/** | ||
* | ||
* Stories for LaunchList | ||
* | ||
* @see https://github.com/storybookjs/storybook | ||
* | ||
*/ | ||
|
||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { LaunchList } from '../index'; | ||
import LaunchList from '../index'; | ||
|
||
const loading = false; | ||
const launchData = { | ||
launches: [ | ||
{ | ||
id: '1', | ||
launchDateUtc: '2014-01-06T14:06:00', | ||
missionName: 'Thaicom 6', | ||
links: { | ||
wikipedia: 'https://en.wikipedia.org/wiki/Thaicom_6', | ||
flickrImages: ['https://farm9.staticflickr.com/8617/16789019815_f99a165dc5_o.jpg'] | ||
} | ||
} | ||
] | ||
export default { | ||
title: 'LaunchList', | ||
component: LaunchList | ||
}; | ||
|
||
storiesOf('LaunchList').add('simple', () => <LaunchList launchData={launchData} loading={loading} />); | ||
const LaunchListTemplate = (args) => <LaunchList {...args} />; | ||
|
||
export const LaunchListStoryComponent = LaunchListTemplate.bind({}); | ||
LaunchListStoryComponent.args = { | ||
launchData: { | ||
launches: [ | ||
{ | ||
id: '1', | ||
launchDateUtc: '2014-01-06T14:06:00', | ||
missionName: 'Thaicom 6', | ||
links: { | ||
wikipedia: 'https://en.wikipedia.org/wiki/Thaicom_6', | ||
flickrImages: ['https://farm9.staticflickr.com/8617/16789019815_f99a165dc5_o.jpg'] | ||
} | ||
} | ||
] | ||
}, | ||
loading: false | ||
}; |
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