Skip to content

Commit

Permalink
Merge pull request #29 from gthomas-appfolio/addInfoWrapper
Browse files Browse the repository at this point in the history
gt - Update decorator to add type title and story header
  • Loading branch information
gthomas-appfolio authored Oct 27, 2016
2 parents f49cf34 + 6b7759e commit d2cb1c3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import InfoAddon from '@kadira/react-storybook-addon-info';
import React from 'react';
import infoAddon from '@kadira/react-storybook-addon-info';
import { Container } from '../src';
import { configure, setAddon, addDecorator } from '@kadira/storybook';

addDecorator((story) => (
<Container className="m-t-2">
{story()}
</Container>
));
addDecorator((story, info) => {
return (<Container className="m-t-2">
<h1>{info.kind}</h1>
<h3 className="text-muted">{info.story}</h3>
<hr />
{story()}
</Container>)
});

setAddon(InfoAddon);
setAddon(infoAddon);

function loadStories() {
require('../stories');
Expand Down

0 comments on commit d2cb1c3

Please sign in to comment.