storybook/docs/snippets/svelte/button-story-with-addon-example.ts.mdx
2023-12-04 21:23:56 +00:00

28 lines
606 B
Plaintext

```ts
// Button.stories.ts
import type { Meta, StoryObj } from '@storybook/svelte';
import Button from './Button.svelte';
const meta: Meta<typeof Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
//👇 Creates specific parameters for the story
parameters: {
myAddon: {
data: 'this data is passed to the addon',
},
},
};
export default meta;
type Story = StoryObj<typeof meta>;
export const Basic: Story = {};
```