import React from "react"; import CloseIcon from "@mui/icons-material/Close"; import { Dialog, DialogContentText, DialogContent, DialogTitle, IconButton, useMediaQuery, useTheme, Typography, } from "@mui/material"; interface Props { title: string; showDialog: boolean; setShowDialog: (state: boolean) => void; children?: React.ReactNode; } function ModalDialog(props: Props) { const theme = useTheme(); const fullScreen = useMediaQuery(theme.breakpoints.down("md")); return (
props.setShowDialog(false)} aria-labelledby="responsive-dialog-title" sx={{ "& .MuiPaper-root": { overflowY: "hidden", }, }} > props.setShowDialog(false)} > {/* This defaults to p but our content can be any element. */} {props.children}
); } export default ModalDialog;