@kickstartds/storybook-addon-html
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Storybook Addon HTML

This addon for Storybook adds a tab that displays the compiled HTML for each story.

Getting Started

With NPM:

npm i --save-dev @kickstartds/storybook-addon-html

With Yarn:

yarn add -D @kickstartds/storybook-addon-html

Register addon

// .storybook/main.js

module.exports = {
  // ...
  addons: [
    "@kickstartds/storybook-addon-html",
    // ...
  ],
};

Usage

You can add decorators to wrap the story. This is usefull if you only want a subset of your decorators being applied for the html output.

export const parameters = {
  html: {
    decorators: [
      (storyFn, context) => (
        <MyProvider>
          {storyFn(context)}
        </MyProvider>
      )
    ],
  },
};

Supported frameworks

  • React

Readme

Keywords

none

Package Sidebar

Install

npm i @kickstartds/storybook-addon-html

Weekly Downloads

33

Version

1.0.0

License

MIT

Unpacked Size

12.6 kB

Total Files

12

Last publish

Collaborators

  • fleven-kds
  • julrich
  • lmestel