interface ModalProps

Passed to Modal by the component that shows it, which unmounts it in onClose.

Properties

title: string
onClose: () => void
children: ReactNode
optional
wide: boolean
optional
onBeforeClose: () => boolean

Runs before a dismissal by Escape, the backdrop or the ✕. Returning false cancels it, so that a dialog holding an unsaved draft can ask first.

Usage

import { type ModalProps } from "src/components/shared/Modal.tsx";