mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
53 lines
1.1 KiB
TypeScript
53 lines
1.1 KiB
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',
|
|
};
|