storybook/docs/snippets/svelte/button-story-using-args.js.mdx
2021-08-28 01:52:57 +01:00

43 lines
608 B
Plaintext

```js
// Button.stories.js
import Button from './Button.svelte';
export default {
component: Button,
};
export const Primary = {
args: {
backgroundColor: '#ff0',
label: 'Button',
},
render: (args) => ({
Component: Button,
props: args,
}),
};
export const Secondary = {
args: {
...Primary.args,
label: '😄👍😍💯',
},
render: (args) => ({
Component: Button,
props: args,
}),
};
export const Tertiary = {
args: {
...Primary.args,
label: '📚📕📈🤓',
},
render: (args) => ({
Component: Button,
props: args,
}),
};
```