import React from 'react'; const Dialog = React.forwardRef((props, ref) => { const { isOpen = false, hideCloseButton = false, onClose, position = 'center', children, onExited, duration, backdropProps, className, paperProps = {}, ...rest } = props; const handleBackdropClick = React.useCallback( (ev) => { if (ev.target !== ev.currentTarget) { return; } if (onClose) { onClose(ev, 'backdropClick'); } }, [onClose] ); const handleKeyDown = React.useCallback((ev) => { if (ev.key === 'Escape') { ev.stopPropagation(); } }, []); return (
); }); export default Dialog;