Skip to content

Commit

Permalink
Merge pull request #10712 from storybookjs/generator_preact
Browse files Browse the repository at this point in the history
cli: preact stories homogenization
  • Loading branch information
tooppaaa authored May 11, 2020
2 parents f87f371 + 5593da3 commit 9f6d392
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @jsx h */
import { h } from 'preact';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';

import Button from './Button';

Expand All @@ -18,3 +19,32 @@ export const Emoji = () => (
</span>
</Button>
);

Emoji.story = {
parameters: { notes: 'My notes on a button with emojis' },
};

export const WithSomeEmojiAndAction = () => (
<Button onClick={action('This was clicked')}>
<span role="img" aria-label="so cool">
😀 😎 👍 💯
</span>
</Button>
);

WithSomeEmojiAndAction.story = {
name: 'with some emoji and action',
parameters: { notes: 'My notes on a button with emojis' },
};

export const ButtonWithLinkToAnotherStory = () => (
<Button onClick={linkTo('Welcome')}>
<span role="img" aria-label="so cool">
😀 😎 👍 💯
</span>
</Button>
);

ButtonWithLinkToAnotherStory.story = {
name: 'button with link to another story',
};

0 comments on commit 9f6d392

Please sign in to comment.