Skip to content

Commit

Permalink
cli: react-scripts stories homogenization
Browse files Browse the repository at this point in the history
  • Loading branch information
tooppaaa committed May 9, 2020
1 parent cd093e1 commit adaed81
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +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 @@ -16,3 +17,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">
Go to Welcome Story
</span>
</Button>
);

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

0 comments on commit adaed81

Please sign in to comment.