0.3.0 • Published 6 years ago

oxygen-rsa-static-markup v0.3.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

npm version

Static Markup addon for React Storybook

Displays 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>
));