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 'meta' to be exported as const from module script
- Loading branch information
Showing
6 changed files
with
143 additions
and
39 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
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
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,35 @@ | ||
<script context='module'> | ||
import Button from './Button.svelte'; | ||
export const meta = { | ||
title: 'MetaExport', | ||
component: Button, | ||
tags: ['autodocs'] | ||
} | ||
</script> | ||
|
||
<script> | ||
import { Story, Template } from '../src/index'; | ||
let count = 0; | ||
function handleClick() { | ||
count += 1; | ||
} | ||
</script> | ||
|
||
<Template let:args> | ||
<Button {...args} on:click={handleClick}> | ||
You clicked: {count} | ||
</Button> | ||
</Template> | ||
|
||
<Story name="Default"/> | ||
|
||
<Story name="Rounded" args={{rounded: true}}/> | ||
|
||
<Story name="Square" source args={{rounded: false}}/> | ||
|
||
<!-- Dynamic snippet should be disabled for this story --> | ||
<Story name="Button No Args"> | ||
<Button>Label</Button> | ||
</Story> |