React Storybook
Static Markup addon forDisplays a panel with an "html version" of a story, as suggested in this thread. (Based on https://github.com/evgenykochetkov/react-storybook-addon-static-markup)
Installation
Install the package:
npm i -D oxygen-rsa-static-markup
or
yarn add oxygen-rsa-static-markup --dev
Register it in your .storybook/addons.js
:
import 'oxygen-rsa-static-markup/lib/register';
Usage
import React from 'react';
import { storiesOf } from '@storybook/react';
import { StaticMarkup } from 'oxygen-rsa-static-markup';
storiesOf('Usage examples', module).add('with HOC', () => (
<StaticMarkup>
<button className="foo bar baz">hello!</button>
</StaticMarkup>
));