Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.03 KB

File metadata and controls

35 lines (25 loc) · 1.03 KB

Component Stories

There is a "Storybook" that shows our React components with a representative set of states for each. This is useful during development and manual testing of components. Components should be developed in the storybook first, then used in the app.

This storybook is for the editor components only.

Made with react-storybook.

Usage

Local storybook on localhost:9001 with hot reload:

make storybook-editor

Build a static deployable storybook in storybook-static. This could be put in gh-pages branch, for example.

make storybook-static

Code

  • story.js is next to a component's index file. It describes the states for a component.
  • stories.js is in the component directory, and is just to combine all the story.js files. It only exists so that the main config does not have lots of long import paths in it.
  • /.storybook-editor/config.js sets up the environment for components and imports all the stories.