import { ReactNode } from "react"; import { createPortal } from "react-dom"; import styles from "./modal.module.scss"; interface ModalProps { close?: (...args: any) => void | Promise; title?: string; children: ReactNode; showCloseBtn?: boolean; } export default function Modal({ close, title, children, showCloseBtn = true, }: ModalProps) { return createPortal(

{title}

{showCloseBtn && }
{children}
, document.body ); }