import { Modal as MantineModal, Button, Box } from '@mantine/core'; import { ReactNode } from 'react'; const TITLEBAR_HEIGHT = '2.5rem'; const MODAL_STYLES_WITH_TITLEBAR = { overlay: { top: TITLEBAR_HEIGHT, }, content: { marginTop: TITLEBAR_HEIGHT, }, } as const; export interface ModalProps { opened: boolean; onClose: () => void; title: ReactNode; children: ReactNode; size?: string | number; closeOnClickOutside?: boolean; closeOnEscape?: boolean; showCloseButton?: boolean; } export const Modal = ({ opened, onClose, title, children, size, closeOnClickOutside = false, closeOnEscape = true, showCloseButton = false, ...props }: ModalProps) => ( {children} {showCloseButton && ( )} );