import React, { useState, useCallback } from "react"; function Section({ title, children }: { title: string; children: React.ReactNode }) { return (

{title}

{children}
); } export default function ModalDemo() { const [open, setOpen] = useState(false); const handleBackdropClick = useCallback( (e: React.MouseEvent) => { if (e.target === e.currentTarget) { setOpen(false); } }, [], ); return (
{open && (

Confirm Action

Are you sure you want to proceed with this action? This operation cannot be undone and will apply changes immediately.

)}
); }