property ModalProps.onBeforeClose

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.

Type

() => boolean

Usage

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