import MaterialModal from '@mui/material/Modal' import IconButton from '@mui/material/IconButton' import SvgIcon from '@mui/material/SvgIcon' import Paper from '@mui/material/Paper' import classnames from 'classnames' import React from 'react' import { H1, H4 } from './typography' import CloseIcon from '../styling/icons/action/close/zodiac.svg?react' const Modal = ({ width, height, infoPanelHeight, title, small, xl, infoPanel, handleClose, children, className, closeOnEscape, closeOnBackdropClick, ...props }) => { const TitleCase = small ? H4 : H1 const innerClose = (evt, reason) => { if (!closeOnBackdropClick && reason === 'backdropClick') return if (!closeOnEscape && reason === 'escapeKeyDown') return handleClose() } const marginBySize = xl ? 0 : small ? 12 : 16 const paddingBySize = xl ? 88 : small ? 16 : 32 return ( <>
{title && ( {title} )}
handleClose()}>
{children}
{infoPanel && (
{infoPanel}
)}
) } export default Modal