import React, { useState } from 'react'; import { ComponentStory } from '@storybook/react'; import { Button } from '../Button'; import { Toast } from './Toast'; import mdx from './Toast.mdx'; const ReactToastStory = ({ ...props }) => { return ( ); }; const ToastMeta = { title: 'UI Components/Toast', component: ReactToastStory, argTypes: { onClick: { action: 'clicked' }, open: { control: 'boolean' }, variant: { control: 'select', options: ['error', 'standard', 'warning', 'success', ''] }, }, args: { variant: 'standard', title: 'Hello from Toast Component', description: 'Hello from toast', isClosable: true, }, parameters: { docs: { page: mdx, }, }, }; const ReactToastComponent: ComponentStory = args => { const [isOpen, setIsOpen] = useState(false); return ( <> setIsOpen(o)} {...args} /> ); }; export const Playground: ComponentStory = ReactToastStory.bind({}); Playground.storyName = 'HMSToast'; export default ToastMeta;