storybook-react-to-static-markup

0.1.2 • Public • Published

Storybook addon to show static markup of react components

Installation

npm install --save-dev storybook-react-to-static-markup

Configuration

Add to .storybook/addons.js

import 'storybook-react-to-static-markup/register'

Add to .storybook/config.js

import { addDecorator } from '@storybook/react'
import { withStaticMarkup } from 'storybook-react-to-static-markup'
...
.addDecorator(withStaticMarkup)

The decorator should preceed all other decorators (such as withInfo). Otherwise the markup will contain the markup of the other decorators.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    34
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    34
  • 0.1.1
    44
  • 0.1.0
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i storybook-react-to-static-markup

Weekly Downloads

78

Version

0.1.2

License

MIT

Unpacked Size

14.6 kB

Total Files

7

Last publish

Collaborators

  • ole-treichel