mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
20 lines
557 B
Plaintext
20 lines
557 B
Plaintext
```html
|
|
<!-- YourComponent.stories.svelte -->
|
|
|
|
<script>
|
|
import { Meta, Template, Story } from '@storybook/addon-svelte-csf';
|
|
|
|
import YourComponent from './YourComponent.svelte';
|
|
</script>
|
|
|
|
<!--👇 The title determines where your story goes in the story list -->
|
|
<Meta title="YourComponent" component={YourComponent} argTypes={{ /* Customize your args here
|
|
depending on your component */ }} />
|
|
|
|
<template let:args>
|
|
<button {...args} />
|
|
</template>
|
|
|
|
<Story name="FirstStory" args={{ /* The args you need here will depend on your component */ }} />
|
|
```
|