import { ReactNode } from 'react'; import * as Dialog from '@radix-ui/react-dialog'; import { HiOutlineX } from 'react-icons/hi'; import { IconButton } from '../IconButton'; import { Overlay, Content, ModalHeader, Size, Title } from './styles'; type ModalProps = { isOpen: boolean; onRequestClose?: () => void; title: string; size?: Size; children: ReactNode; }; export function Modal({ isOpen, onRequestClose, title, size = 'md', children, }: ModalProps): JSX.Element { return ( {title} {onRequestClose && ( } /> )} {children} ); }