storybook/docs/snippets/svelte/list-story-expanded.native-format.mdx
2021-05-06 17:36:21 +01:00

37 lines
679 B
Plaintext

```html
<!-- List.stories.svelte -->
<script>
import { Meta, Template, Story } from '@storybook/addon-svelte-csf';
import List from "./List.svelte";
import ListItem from './ListItem.svelte';
</script>
<Meta title="List" component={List} />
<Template let:args id="Empty">
<List {...args} />
</Template>
<Template let:args id="OneItem">
<List {...args}>
<ListItem />
</List>
</Template>
<Template let:args id="ManyItems">
<List {...args}>
<ListItem />
<ListItem />
<ListItem />
</List>
</Template>
<Story name="Empty" template="Empty" />
<Story name="OneItem" template="OneItem" />
<Story name="MultipleItems" template="ManyItems" />
```