mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-20 05:02:37 +08:00
Merge pull request #10709 from storybookjs/generator_webpackReact
cli: webpack react stories homogenization
This commit is contained in:
commit
890d8e177e
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { linkTo } from '@storybook/addon-links';
|
||||
import { Button } from '@storybook/react/demo';
|
||||
|
||||
export default {
|
||||
@ -19,5 +19,30 @@ export const Emoji = () => (
|
||||
);
|
||||
|
||||
Emoji.story = {
|
||||
name: 'with emoji',
|
||||
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">
|
||||
Go to Welcome Story
|
||||
</span>
|
||||
</Button>
|
||||
);
|
||||
|
||||
ButtonWithLinkToAnotherStory.story = {
|
||||
name: 'button with link to another story',
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user