UNPKG

react-storybook-addon-chapters

Version:

React Storybook Chapters addon allows showcasing of multiple components within a story by breaking it down into smaller categories (chapters) and subcategories (sections) for more organizational goodness.

16 lines (12 loc) 310 B
import React from 'react'; import { configure, setAddon, addDecorator } from '@storybook/react'; import chapterAddon from '../src/'; addDecorator((story) => ( <div style={{padding: 20}}> {story()} </div> )); setAddon(chapterAddon); configure(function () { require('../example/story'); }, module);