48
client/cms/src/stories/events/checkin-dialog.stories.tsx
Normal file
48
client/cms/src/stories/events/checkin-dialog.stories.tsx
Normal file
@@ -0,0 +1,48 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react-vite';
|
||||
import { CheckinQrDialogError } from '@/components/checkin/checkin-qr.dialog.error';
|
||||
import { CheckinQrDialogSkeleton } from '@/components/checkin/checkin-qr.dialog.skeleton';
|
||||
import { CheckinQrDialogView } from '@/components/checkin/checkin-qr.dialog.view';
|
||||
import { Dialog } from '@/components/ui/dialog';
|
||||
|
||||
const meta = {
|
||||
title: 'Events/CheckinQRDialog',
|
||||
component: CheckinQrDialogView,
|
||||
decorators: [
|
||||
Story => (
|
||||
<Dialog open={true}>
|
||||
<Story />
|
||||
</Dialog>
|
||||
),
|
||||
],
|
||||
} satisfies Meta<typeof CheckinQrDialogView>;
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Prompt: Story = {
|
||||
args: {
|
||||
checkinCode: '114514',
|
||||
},
|
||||
};
|
||||
|
||||
export const Skeleton: Story = {
|
||||
render: () => (
|
||||
<Dialog open={true}>
|
||||
<CheckinQrDialogSkeleton />
|
||||
</Dialog>
|
||||
),
|
||||
args: {
|
||||
checkinCode: '',
|
||||
},
|
||||
};
|
||||
|
||||
export const Error: Story = {
|
||||
render: () => (
|
||||
<Dialog open={true}>
|
||||
<CheckinQrDialogError />
|
||||
</Dialog>
|
||||
),
|
||||
args: {
|
||||
checkinCode: '',
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user