mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
28 lines
606 B
Plaintext
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 = {};
|
|
```
|