import { Modal } from './modal'; import { Meta, StoryObj } from '@storybook/react'; const meta: Meta = { title: 'Components/Modal', component: Modal, argTypes: { isOpen: { control: 'boolean' }, onClose: { action: 'closed' }, className: { control: 'text' }, overlayClassName: { control: 'text' }, closeButtonClassName: { control: 'text' }, disableEscapeKeyDown: { control: 'boolean' }, 'aria-label': { control: 'text' }, 'aria-labelledby': { control: 'text' }, 'aria-describedby': { control: 'text' }, }, }; export default meta; type Story = StoryObj; export const Default: Story = { args: { isOpen: true, onClose: () => { console.log('Modal closed'); }, children: ( <> Modal Title This is a simple modal description. This is the main content of the modal. ), }, }; export const CustomClasses: Story = { args: { ...Default.args, className: 'bg-red-100', overlayClassName: 'bg-opacity-50', closeButtonClassName: 'text-red-500', }, }; export const NoEscapeClose: Story = { args: { ...Default.args, disableEscapeKeyDown: true, }, }; export const WithAria: Story = { args: { ...Default.args, 'aria-label': 'Custom Modal', 'aria-labelledby': 'modal-title', 'aria-describedby': 'modal-desc', children: ( <> Modal Title This is a modal with ARIA attributes. Modal content here. ), }, };