Files
AstralRinth/packages/ui/src/stories/base/Badge.stories.ts
Truman Gao daf804947c devex: storybook for UI Package (#4984)
* add storybook

* clean up stories

* small fix

* add stories for all components

* add vintl

* default to dark mode

* fix  teleport

* add theme addon

* add new modal story

* delete broken stories

* move all stories to central stories folder

* fix paths

* add pnpm run storybook

* remove chromatic

* add add-stories.md

* fix types

* fix unncessary args field

* cover more addordion states

* pt2

* remove old vintl

* fix: missing style + ctx

---------

Co-authored-by: Calum H. (IMB11) <contact@cal.engineer>
2026-01-02 00:32:58 +00:00

55 lines
1.1 KiB
TypeScript

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import Badge from '../../components/base/Badge.vue'
const meta = {
title: 'Base/Badge',
component: Badge,
} satisfies Meta<typeof Badge>
export default meta
type Story = StoryObj<typeof meta>
export const Default: Story = {
args: {
type: 'approved',
},
}
export const ProjectStatuses: StoryObj = {
render: () => ({
components: { Badge },
template: /*html*/ `
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem;">
<Badge type="approved" />
<Badge type="unlisted" />
<Badge type="private" />
<Badge type="draft" />
<Badge type="archived" />
<Badge type="rejected" />
<Badge type="processing" />
</div>
`,
}),
}
export const UserRoles: StoryObj = {
render: () => ({
components: { Badge },
template: /*html*/ `
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem;">
<Badge type="admin" />
<Badge type="moderator" />
<Badge type="creator" />
</div>
`,
}),
}
export const WithColor: Story = {
args: {
type: 'release',
color: 'green',
},
}