import * as React from 'react'; import { useArgs } from 'storybook/preview-api'; import { Button } from '@box/blueprint-web'; import PreviewDialog from '../preview-dialog/PreviewDialog'; import { addRootElement } from '../../../utils/storybook'; // need to import this into the story because it's usually in ContentExplorer import '../modal.scss'; export const previewDialog = { // eslint-disable-next-line @typescript-eslint/no-explicit-any render: (args: any) => { // eslint-disable-next-line react-hooks/rules-of-hooks const [, setArgs] = useArgs(); const handleOpenModal = () => setArgs({ isOpen: true }); const handleCloseModal = () => { setArgs({ isOpen: false }); }; const { appElement, rootElement } = addRootElement(); return (
); }, }; export default { title: 'Elements/Common/PreviewDialog', component: PreviewDialog, args: { isLoading: false, isOpen: false, token: global.TOKEN, }, };