Nychthemeron/packages/playground/stories/Badge.stories.ts
Matthew L McPeak 5238d61f24 feat: migrate Tag to shadcn-vue Badge
Also fixes Card.stories.ts, which imported the now-removed Tag export.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-11 14:32:18 -04:00

46 lines
1.2 KiB
TypeScript

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Badge as NychBadge } from '@nychthemeron/library'
const meta = {
title: 'Components/Badge',
component: NychBadge,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
argTypes: {
variant: {
control: { type: 'select' },
options: ['primary', 'secondary', 'info', 'success', 'warning', 'danger'],
},
},
} satisfies Meta<typeof NychBadge>
export default meta
type Story = StoryObj<typeof meta>
export const Default: Story = {
args: { variant: 'primary' },
render: (args) => ({
components: { NychBadge },
setup: () => ({ args }),
template: `<NychBadge v-bind="args">Mortal</NychBadge>`,
}),
}
export const AllVariants: Story = {
render: () => ({
components: { NychBadge },
template: `
<div style="display: flex; gap: 0.5rem; flex-wrap: wrap;">
<NychBadge variant="primary">Primary</NychBadge>
<NychBadge variant="secondary">Secondary</NychBadge>
<NychBadge variant="info">Info</NychBadge>
<NychBadge variant="success">Success</NychBadge>
<NychBadge variant="warning">Warning</NychBadge>
<NychBadge variant="danger">Danger</NychBadge>
</div>
`,
}),
}