import React from "react"; import { Close } from "@mui/icons-material"; import { Button, Dialog, DialogContent, DialogTitle, Divider, IconButton, } from "@mui/material"; import { Link } from "react-router-dom"; import type { SxProps } from "@mui/system/styleFunctionSx"; import type { Theme } from "@mui/system"; export function PopUp(props: { title?: string; closeBtn?: boolean; open: boolean; setOpen: React.Dispatch>; buttons?: { text: string; link: string }[]; children: JSX.Element | JSX.Element[]; fullScreen?: boolean; fullWidth?: boolean; sx?: SxProps; className?: string; }) { const { title, open, setOpen, buttons, children, fullScreen, fullWidth, sx, className, closeBtn, } = props; const handleClose = () => { setOpen(false); }; return ( {(title || closeBtn) && (

{title}

)}
{children}
{!!buttons?.length && (
{buttons?.map((button, index) => ( ))}
)}
); }