import { action } from 'storybook/actions'; import { useState } from 'react'; import { Button, Nudge } from '../..'; import { createSandboxStory, globalScope, } from '../../../.storybook/components/sandbox/SandboxEditor'; import DropFade from '../DropFade'; export default { title: 'Dialogs/DropFade', component: DropFade, }; export const Sandbox = createSandboxStory({ code: `const App = () => { const [show, setShow] = React.useState(false); return ( <>
setShow(false)} />
); };`, scope: globalScope, }); export const Basic = () => { const [open, setOpen] = useState(false); return (
} mediaName="globe" title="Did you know it's cool to be Wise?" link="Get Wise" href="https://wise.com" onClick={action('action clicked')} onDismiss={() => { action('dismissed'); setOpen(false); }} />
); };