# storybook-react-to-static-markup

> A storybook addon which shows static markup of react components

Latest version **0.1.2** (published 2021-02-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install storybook-react-to-static-markup
pnpm add storybook-react-to-static-markup
yarn add storybook-react-to-static-markup
bun add storybook-react-to-static-markup
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2021-02-27 |
| First published | 2019-05-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 14.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Ole Treichel |
| Maintainers | ole-treichel |

## Links

- npm: https://www.npmjs.com/package/storybook-react-to-static-markup
- Repository: https://github.com/ole-treichel/storybook-react-to-static-markup
- Homepage: https://github.com/ole-treichel/storybook-react-to-static-markup#readme
- Issues: https://github.com/ole-treichel/storybook-react-to-static-markup/issues
- npm.io page: https://npm.io/package/storybook-react-to-static-markup

## Dependencies (6)

- [lodash](https://npm.io/package/lodash.md) >=4.17.13
- [pretty](https://npm.io/package/pretty.md) ^2.0.0
- [prismjs](https://npm.io/package/prismjs.md) ^1.16.0
- [@storybook/addons](https://npm.io/package/@storybook/addons.md) 5.0.11
- [@storybook/components](https://npm.io/package/@storybook/components.md) 5.0.11
- [@storybook/core-events](https://npm.io/package/@storybook/core-events.md) 5.0.11

## Recent versions

- 0.1.2 (latest) — 2021-02-27
- 0.1.1 — 2019-08-14
- 0.1.0 — 2019-07-25
- 0.0.1 — 2019-05-20

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

---
_Source: https://npm.io/package/storybook-react-to-static-markup · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
