cli: preact stories homogenization

This commit is contained in:
tooppaaa 2020-05-09 11:28:36 +02:00
parent 9c88a3788a
commit 71ac662f3c

View File

@ -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';
@ -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',
};