Skip to content

Commit

Permalink
Merge pull request #10707 from storybookjs/generator_mithril
Browse files Browse the repository at this point in the history
cli: mithril stories homogenization
  • Loading branch information
tooppaaa authored May 11, 2020
2 parents 781edbc + b04442b commit 3a87008
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import m from 'mithril';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';
import Button from './Button';

export default {
Expand All @@ -19,3 +20,29 @@ export const Emoji = () => ({
m('span', { role: 'img', ariaLabel: 'so cool' }, '😀 😎 👍 💯')
),
});

Emoji.story = {
parameters: { notes: 'My notes on a button with emojis' },
};

export const WithSomeEmojiAndAction = () => ({
view: () =>
m(
Button,
{ onclick: action('This was clicked') },
m('span', { role: 'img', ariaLabel: 'so cool' }, '😀 😎 👍 💯')
),
});

WithSomeEmojiAndAction.story = {
name: 'with some emoji and action',
parameters: { notes: 'My notes on a button with emojis' },
};

export const ButtonWithLinkToAnotherStory = () => ({
view: () => m(Button, { onclick: linkTo('Welcome') }, 'Go to Welcome Story'),
});

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

0 comments on commit 3a87008

Please sign in to comment.