2020-02-18 13:52:22 +01:00
|
|
|
import { action } from '@storybook/addon-actions';
|
|
|
|
import { linkTo } from '@storybook/addon-links';
|
|
|
|
|
|
|
|
import { Button } from '@storybook/angular/demo';
|
|
|
|
|
|
|
|
export default {
|
2020-04-14 11:28:33 +02:00
|
|
|
title: 'Button',
|
|
|
|
component: Button,
|
2020-02-18 13:52:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
export const Text = () => ({
|
2020-04-14 11:28:33 +02:00
|
|
|
component: Button,
|
|
|
|
props: {
|
|
|
|
text: 'Hello Button',
|
|
|
|
},
|
2020-02-18 13:52:22 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
export const Emoji = () => ({
|
2020-04-14 11:28:33 +02:00
|
|
|
component: Button,
|
|
|
|
props: {
|
|
|
|
text: '😀 😎 👍 💯',
|
|
|
|
},
|
2020-02-18 13:52:22 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
Emoji.story = {
|
2020-04-14 11:28:33 +02:00
|
|
|
parameters: { notes: 'My notes on a button with emojis' },
|
2020-02-18 13:52:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
export const WithSomeEmojiAndAction = () => ({
|
2020-04-14 11:28:33 +02:00
|
|
|
component: Button,
|
|
|
|
props: {
|
|
|
|
text: '😀 😎 👍 💯',
|
|
|
|
onClick: action('This was clicked OMG'),
|
|
|
|
},
|
2020-02-18 13:52:22 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
WithSomeEmojiAndAction.story = {
|
2020-04-14 11:28:33 +02:00
|
|
|
name: 'with some emoji and action',
|
|
|
|
parameters: { notes: 'My notes on a button with emojis' },
|
2020-02-18 13:52:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
export const ButtonWithLinkToAnotherStory = () => ({
|
2020-04-14 11:28:33 +02:00
|
|
|
component: Button,
|
|
|
|
props: {
|
|
|
|
text: 'Go to Welcome Story',
|
|
|
|
onClick: linkTo('Welcome'),
|
|
|
|
},
|
2020-02-18 13:52:22 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
ButtonWithLinkToAnotherStory.story = {
|
2020-04-14 11:28:33 +02:00
|
|
|
name: 'button with link to another story',
|
2020-02-18 13:52:22 +01:00
|
|
|
};
|