Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ole-treichel/storybook-react-to-static-markup

Storybook addon to show static markup of react components
https://github.com/ole-treichel/storybook-react-to-static-markup

react storybook storybook-addon

Last synced: about 2 months ago
JSON representation

Storybook addon to show static markup of react components

Awesome Lists containing this project

README

        

# 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.