funky-framadate-front/src/stories/1-Button.stories.ts

53 lines
1016 B
TypeScript

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