generated from storybookjs/addon-kit
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow indexer parser walking on instance & add stories with legacy in…
…stance test
- Loading branch information
Showing
2 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<script lang="ts"> | ||
import { Story, Template } from '@storybook/addon-svelte-csf'; | ||
import type { Meta } from '@storybook/svelte'; | ||
import LegacyTemplate from './LegacyTemplate.svelte'; | ||
/** | ||
* Description set explicitly in the comment above export const meta. | ||
* | ||
* Multiline supported. And also Markdown syntax: | ||
* | ||
* * **Bold**, | ||
* * _Italic_, | ||
* * `Code`. | ||
*/ | ||
export const meta = { | ||
title: 'LegacyTemplate', | ||
component: LegacyTemplate, | ||
tags: ['autodocs'], | ||
} satisfies Meta<LegacyTemplate>; | ||
let count = $state(0); | ||
function handleClick() { | ||
count += 1; | ||
} | ||
</script> | ||
|
||
<Template let:args let:context> | ||
<p>Using default template</p> | ||
<LegacyTemplate {...args} onclick={handleClick} /> | ||
</Template> | ||
|
||
<Template id="rounded" let:args> | ||
<p>Using rounded template</p> | ||
<LegacyTemplate {...args} onclick={handleClick} rounded /> | ||
</Template> | ||
|
||
<Story name="Default" /> | ||
|
||
<Story name="Rounded" template="rounded" /> |