Skip to content

Storybook addon for displaying static markup in the addon panel

Notifications You must be signed in to change notification settings

TriOxygen/oxygen-rsa-static-markup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Storybook addon for displaying static markup in the addon panel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published