import type { Meta, StoryObj } from '@storybook/vue3-vite' import { Alert as NychAlert, AlertTitle as NychAlertTitle, AlertDescription as NychAlertDescription } from '@nychthemeron/library' const meta = { title: 'Components/Alert', component: NychAlert, parameters: { layout: 'centered', }, tags: ['autodocs'], argTypes: { variant: { control: { type: 'select' }, options: ['info', 'success', 'warning', 'danger', 'secondary'], }, closable: { control: { type: 'boolean' }, }, }, } satisfies Meta export default meta type Story = StoryObj export const Info: Story = { args: { variant: 'info' }, render: (args) => ({ components: { NychAlert, NychAlertTitle }, setup: () => ({ args }), template: ` The Oracle has spoken. `, }), } export const Closable: Story = { args: { variant: 'info', closable: true }, render: (args) => ({ components: { NychAlert, NychAlertTitle }, setup: () => ({ args }), template: ` This omen may be dismissed. `, }), } export const WithDescription: Story = { render: () => ({ components: { NychAlert, NychAlertTitle, NychAlertDescription }, template: ` The ferryman grows impatient. One obol is required to cross the Styx. `, }), } export const AllVariants: Story = { render: () => ({ components: { NychAlert, NychAlertTitle }, template: `
The Oracle has spoken. The offering was accepted. The ferryman grows impatient. The gods have refused your plea. A neutral notice from the keeper.
`, }), }