import React, { useState } from 'react'; import { storybookExcludedControlParams, StoryMetaType, } from '@lg-tools/storybook-utils'; import { StoryFn } from '@storybook/react'; import { Button } from '@leafygreen-ui/button'; import { css } from '@leafygreen-ui/emotion'; import { ToastProvider, Variant } from '..'; import { type ControlledToastProps, Toast } from '.'; const meta: StoryMetaType = { title: 'Components/Notifications/Toast/Controlled', component: Toast, parameters: { default: 'Basic', controls: { exclude: [...storybookExcludedControlParams, 'open'], }, chromatic: { disableSnapshot: true }, }, args: { title: 'Velit ea exercitation qui aute dolor proident.', description: 'Exercitation incididunt ea proident velit mollit', open: true, variant: Variant.Note, progress: 0, className: css` z-index: 1; `, }, argTypes: { variant: { control: 'select', options: Object.values(Variant), default: Variant.Note, }, progress: { control: { type: 'range', min: 0, max: 1, step: 0.1 }, if: { arg: 'variant', eq: Variant.Progress }, }, description: { control: 'text', }, title: { control: 'text', }, }, }; export default meta; export const Basic: StoryFn = args => { const [open, setOpen] = useState(false); return ( { setOpen(false); }} /> ); }; Basic.parameters = { chromatic: { disableSnapshot: true }, };