Skip to content

Commit

Permalink
convert-module-to-mdx: story decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Jul 19, 2019
1 parent 682be7c commit ace6e72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ export default {
};

export const story1 = () => <Button label="The Button" />;
story1.story = { name: 'with decorator' };
story1.story = {
name: 'with decorator',
decorators: [withKnobs],
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import { Meta, Story } from '@storybook/addon-docs/blocks';
title='Some.Button'
decorators={[withKnobs, storyFn => <div className='foo'>{storyFn}</div>]} />

<Story name='with decorator'><Button label='The Button' /></Story>
<Story name='with decorator' decorators={[withKnobs]}><Button label='The Button' /></Story>

0 comments on commit ace6e72

Please sign in to comment.