Skip to content

Commit

Permalink
Merge pull request #10709 from storybookjs/generator_webpackReact
Browse files Browse the repository at this point in the history
cli: webpack react stories homogenization
  • Loading branch information
tooppaaa authored May 11, 2020
2 parents 37968d6 + d614bb7 commit 890d8e1
Showing 1 changed file with 27 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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',
};

0 comments on commit 890d8e1

Please sign in to comment.