mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-16 05:03:11 +08:00
cli: preact stories homogenization
This commit is contained in:
parent
9c88a3788a
commit
71ac662f3c
@ -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',
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user