Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/ole-treichel/storybook-react-to-static-markup
- Owner: ole-treichel
- Created: 2019-05-20T13:36:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-30T10:40:02.000Z (over 1 year ago)
- Last Synced: 2024-11-11T20:33:26.539Z (3 months ago)
- Topics: react, storybook, storybook-addon
- Language: JavaScript
- Size: 254 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.