import React, { useState } from 'react'; import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Stack, Typography } from '@mui/material'; import InfoIcon from '@mui/icons-material/Info'; function InfoDialog(props: {onClose?: () => void, title: string, content: string | JSX.Element, open: boolean }) { const [open, setOpen] = useState(true); const onClose = () => { setOpen(false); if (props.onClose !== undefined) { props.onClose(); } } return ( {props.title} { typeof props.content === 'string' && {props.content} } { typeof props.content !== 'string' && props.content } ); } export default InfoDialog;