chore: rewrite existing shared/ui stories using snippet template pattern
This commit is contained in:
@@ -50,33 +50,47 @@ const placeholder = 'Enter text';
|
||||
|
||||
<!-- Default Story -->
|
||||
<Story name="Default" args={{ placeholder }}>
|
||||
<Input bind:value={valueDefault} {placeholder} />
|
||||
{#snippet template(args)}
|
||||
<Input bind:value={valueDefault} {placeholder} {...args} />
|
||||
{/snippet}
|
||||
</Story>
|
||||
|
||||
<!-- Size Variants -->
|
||||
<Story name="Small" args={{ placeholder }}>
|
||||
<Input bind:value={valueSm} {placeholder} size="sm" />
|
||||
{#snippet template(args)}
|
||||
<Input bind:value={valueSm} {placeholder} size="sm" {...args} />
|
||||
{/snippet}
|
||||
</Story>
|
||||
|
||||
<Story name="Medium" args={{ placeholder }}>
|
||||
<Input bind:value={valueMd} {placeholder} size="md" />
|
||||
{#snippet template(args)}
|
||||
<Input bind:value={valueMd} {placeholder} size="md" {...args} />
|
||||
{/snippet}
|
||||
</Story>
|
||||
|
||||
<Story name="Large" args={{ placeholder }}>
|
||||
<Input bind:value={valueLg} {placeholder} size="lg" />
|
||||
{#snippet template(args)}
|
||||
<Input bind:value={valueLg} {placeholder} size="lg" {...args} />
|
||||
{/snippet}
|
||||
</Story>
|
||||
|
||||
<!-- Ghost Variant with Sizes -->
|
||||
<Story name="Ghost Small" args={{ placeholder }}>
|
||||
<Input bind:value={valueGhostSm} {placeholder} variant="ghost" size="sm" />
|
||||
{#snippet template(args)}
|
||||
<Input bind:value={valueGhostSm} {placeholder} variant="ghost" size="sm" {...args} />
|
||||
{/snippet}
|
||||
</Story>
|
||||
|
||||
<Story name="Ghost Medium" args={{ placeholder }}>
|
||||
<Input bind:value={valueGhostMd} {placeholder} variant="ghost" size="md" />
|
||||
{#snippet template(args)}
|
||||
<Input bind:value={valueGhostMd} {placeholder} variant="ghost" size="md" {...args} />
|
||||
{/snippet}
|
||||
</Story>
|
||||
|
||||
<Story name="Ghost Large" args={{ placeholder }}>
|
||||
<Input bind:value={valueGhostLg} {placeholder} variant="ghost" size="lg" />
|
||||
{#snippet template(args)}
|
||||
<Input bind:value={valueGhostLg} {placeholder} variant="ghost" size="lg" {...args} />
|
||||
{/snippet}
|
||||
</Story>
|
||||
|
||||
<!-- Size Comparison -->
|
||||
|
||||
Reference in New Issue
Block a user