Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Add react storybook - Closes #496 #497

Merged
merged 9 commits into from
Jul 24, 2017
Merged

Add react storybook - Closes #496 #497

merged 9 commits into from
Jul 24, 2017

Conversation

willclarktech
Copy link
Contributor

@willclarktech willclarktech commented Jul 19, 2017

Proof of concept for React Storybook.

Closes #496

Fonts aren't working currently, and I didn't want to go too deep into your webpack config to figure out why.

You can run npm run storybook to host storybook at localhost:6006 to see a catalogue of stories. Then you can select components down the side (and in the case of Address there are two different "stories"). In Dialog if you click on "Close modal" you will see an action logged via a prop passed to the component.

Once you've selected the component/story you're interested in, going to localhost:6006/iframe.html?[your params] will show you just the component, which is really nice to develop with.

Structure

Storybook config is in ./.storybook, stories related to components are in ./stories.

Extending

Follow the pattern in ./stories/index.js. Obviously it would be nice to split this up into different files, and you could even have story files next to components like your test files.

Further steps

We could host this so internal and external contributors can browse our library of components to see what can be reused or modified, to see expected behaviour, which actions are fired when etc. Ideally we would separate the components into a separate module for reuse in other projects (e.g. explorer).

@willclarktech willclarktech changed the title Add react storybook Add react storybook - Closes #496 Jul 19, 2017
@slaweet slaweet self-assigned this Jul 24, 2017
@slaweet slaweet requested review from slaweet and removed request for slaweet July 24, 2017 13:04
@slaweet slaweet merged commit 3be47c5 into development Jul 24, 2017
@slaweet slaweet deleted the 496-react_storybook branch July 24, 2017 13:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants