Skip to content

Commit

Permalink
gt - Update decorator to add type title and story header
Browse files Browse the repository at this point in the history
  • Loading branch information
gthomas-appfolio committed Oct 27, 2016
1 parent dfd2f56 commit 6b7759e
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 6b7759e

Please sign in to comment.