2025-11-21 12:18:04 +01:00
|
|
|
<script module>
|
|
|
|
|
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
|
|
|
import { Badge } from '@cio/ui/base/badge';
|
|
|
|
|
|
|
|
|
|
const { Story } = defineMeta({
|
|
|
|
|
title: 'Atom/Badge',
|
|
|
|
|
component: Badge,
|
|
|
|
|
parameters: {
|
|
|
|
|
layout: 'centered'
|
|
|
|
|
},
|
|
|
|
|
tags: ['autodocs']
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<Story name="Default">
|
|
|
|
|
{#snippet template()}
|
|
|
|
|
<Badge>Default Badge</Badge>
|
|
|
|
|
{/snippet}
|
|
|
|
|
</Story>
|
|
|
|
|
|
|
|
|
|
<Story name="Secondary">
|
|
|
|
|
{#snippet template()}
|
|
|
|
|
<Badge variant="secondary">Secondary</Badge>
|
|
|
|
|
{/snippet}
|
|
|
|
|
</Story>
|
|
|
|
|
|
|
|
|
|
<Story name="Destructive">
|
|
|
|
|
{#snippet template()}
|
|
|
|
|
<Badge variant="destructive">Destructive</Badge>
|
|
|
|
|
{/snippet}
|
|
|
|
|
</Story>
|
|
|
|
|
|
2026-03-09 11:18:22 +01:00
|
|
|
<Story name="Warning">
|
|
|
|
|
{#snippet template()}
|
|
|
|
|
<Badge variant="warning">Warning</Badge>
|
|
|
|
|
{/snippet}
|
|
|
|
|
</Story>
|
|
|
|
|
|
|
|
|
|
<Story name="Success">
|
|
|
|
|
{#snippet template()}
|
|
|
|
|
<Badge variant="success">Success</Badge>
|
|
|
|
|
{/snippet}
|
|
|
|
|
</Story>
|
|
|
|
|
|
2025-11-21 12:18:04 +01:00
|
|
|
<Story name="Outline">
|
|
|
|
|
{#snippet template()}
|
|
|
|
|
<Badge variant="outline">Outline</Badge>
|
|
|
|
|
{/snippet}
|
|
|
|
|
</Story>
|
|
|
|
|
|
|
|
|
|
<Story name="Multiple Badges">
|
|
|
|
|
{#snippet template()}
|
|
|
|
|
<div class="flex gap-2">
|
|
|
|
|
<Badge>Default</Badge>
|
|
|
|
|
<Badge variant="secondary">Secondary</Badge>
|
|
|
|
|
<Badge variant="destructive">Destructive</Badge>
|
2026-03-09 11:18:22 +01:00
|
|
|
<Badge variant="warning">Warning</Badge>
|
|
|
|
|
<Badge variant="success">Success</Badge>
|
2025-11-21 12:18:04 +01:00
|
|
|
<Badge variant="outline">Outline</Badge>
|
|
|
|
|
</div>
|
|
|
|
|
{/snippet}
|
|
|
|
|
</Story>
|