Files
AstralRinth/packages/ui/src/stories/base/Admonition.stories.ts
T
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

39 lines
984 B
TypeScript

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import Admonition from '../../components/base/Admonition.vue'
const meta = {
title: 'Base/Admonition',
component: Admonition,
} satisfies Meta<typeof Admonition>
export default meta
type Story = StoryObj<typeof meta>
export const Default: Story = {
args: {
body: 'This is an informational message.',
},
}
export const AllTypes: Story = {
render: () => ({
components: { Admonition },
template: /*html*/ `
<div style="display: flex; flex-direction: column; gap: 1rem;">
<Admonition type="info" header="Info" body="This is an informational message." />
<Admonition type="warning" header="Warning" body="This is a warning message." />
<Admonition type="critical" header="Critical" body="This is a critical message." />
</div>
`,
}),
}
export const WithHeader: Story = {
args: {
type: 'warning',
header: 'Important Notice',
body: 'Please read this carefully before proceeding.',
},
}