import React from "react"; import clsx from "clsx"; import {Box, Modal} from "@mui/material"; import {Button, Typography} from "@material-ui/core"; import "./dialog.css"; export default function Dialog(props) { const show = props.show; const onClose = props.onClose || function() { }; const onOption = props.onOption || function() { }; const options = props.options || ["Close"]; const type = props.type || "default"; let buttons = []; for (let name of options) { let type = "default"; if (name === "Yes") type = "warning"; else if(name === "No") type = "danger"; buttons.push( ) } return {props.title} {props.message} { buttons } }