Skip to content

A storybook addon for outputting rendered react templates to html.

License

Notifications You must be signed in to change notification settings

AndyArcherZone/storybook-react-to-html-addon

Repository files navigation

storybook-react-to-html-addon

Reasoning

This is useful if you're wanting to use React going forward but perhaps you have to support a lot of legacy before a switch. This will allow you to develop your react component library whilst maintaining any output required for legacy systems. Win win win.

Setup

In your addons.js add the following line:

import 'storybook-react-to-html-addon/register';

Usage

In your story file add the following import:

import withShowHtml from 'storybook-react-to-html-addon';

Then within your story add: addDecorator(withShowHtml)

e.g.

storiesOf('Example', module)
  .addDecorator(withShowHtml)
  .add('Default', () => (
    <MyReactComponent />
  ))

About

A storybook addon for outputting rendered react templates to html.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published