import React from "react"; import clsx from "clsx"; export default function Dialog(props) { const show = props.show; const classes = ["modal", "fade"]; const style = { paddingRight: "12px", display: (show ? "block" : "none") }; const onClose = props.onClose || function() { }; const onOption = props.onOption || function() { }; const options = props.options || ["Close"]; let buttons = []; for (let name of options) { let type = "default"; if (name === "Yes") type = "warning"; else if(name === "No") type = "danger"; buttons.push( ) } return (
onClose()}>
e.stopPropagation()}>

{props.title}

{props.message}

{ buttons }
); }