import { ReactNode } from 'react' import { Dialog, Portal, IconButton, } from '@chakra-ui/react' import { FiX } from 'react-icons/fi' interface ModalProps { open: boolean onClose: () => void title: string children: ReactNode } export default function Modal({ open, onClose, title, children }: ModalProps) { return ( { if (!e.open) onClose() }}> {title} {children} ) }