import { Button, Dialog, Form, Input, useModal } from '@fluid-design/fluid-ui'; import { useState } from 'react'; import clsxm from '@/lib/clsxm'; const Wrap = ({ className = '', children }) => { return (
{children}
); }; const NestedModal2 = ({ dismiss }) => { const [nestedModal] = useModal(NestedModal1); return ( Are you sure? You have unsaved changes. Are you sure you want to cancel? All unsaved changes will be lost. ); }; const NestedModal1 = ({ dismiss }) => { const [nestedModal] = useModal(NestedModal2); return ( Are you sure? You have unsaved changes. Are you sure you want to cancel? All unsaved changes will be lost. ); }; const ConfirmCancelModal = ({ onConfirm, dismiss, ...props }) => { return ( Are you sure? You have unsaved changes. Are you sure you want to cancel? All unsaved changes will be lost. ); }; const ConfirmCancelModalWrap = ({ onConfirm, dismiss, onClose, ...props }) => { const [presentConfirmModal] = useModal(ConfirmCancelModal, { onConfirm: () => dismiss(), }); const [name, setName] = useState('John Doe'); const canDismiss = name === 'John Doe'; onClose(canDismiss ? dismiss : presentConfirmModal); return ( My Profile Enter your profile information below. (Try change the name to something else and try to close the modal.)
null} > setName(e.target.value)} />
); }; const SimpleModal = ({ dismiss }) => { return ( Modal Title This is a simple modal. It has a title, a description, and a footer.

Modal Content

); }; const SimpleComponent = () => { const [presentModal] = useModal(SimpleModal); return (