feat: add missing storybook files and type template arguments properly
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<script module>
|
||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||
import SectionTitle from './SectionTitle.svelte';
|
||||
|
||||
const { Story } = defineMeta({
|
||||
title: 'Shared/SectionTitle',
|
||||
component: SectionTitle,
|
||||
tags: ['autodocs'],
|
||||
parameters: {
|
||||
docs: {
|
||||
description: { component: 'Large responsive heading for named page sections.' },
|
||||
story: { inline: false },
|
||||
},
|
||||
layout: 'centered',
|
||||
},
|
||||
argTypes: {
|
||||
text: {
|
||||
control: 'text',
|
||||
description: 'Heading text; renders nothing when omitted',
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import type { ComponentProps } from 'svelte';
|
||||
</script>
|
||||
|
||||
<Story name="Default/Basic" args={{ text: 'Browse Fonts' }}>
|
||||
{#snippet template(args: ComponentProps<typeof SectionTitle>)}
|
||||
<SectionTitle {...args} />
|
||||
{/snippet}
|
||||
</Story>
|
||||
|
||||
<Story name="Long title" args={{ text: 'Explore Typefaces From Around the World' }}>
|
||||
{#snippet template(args: ComponentProps<typeof SectionTitle>)}
|
||||
<SectionTitle {...args} />
|
||||
{/snippet}
|
||||
</Story>
|
||||
|
||||
<Story name="Empty" args={{}}>
|
||||
{#snippet template(args: ComponentProps<typeof SectionTitle>)}
|
||||
<SectionTitle {...args} />
|
||||
{/snippet}
|
||||
</Story>
|
||||
Reference in New Issue
Block a user