import { IconButton } from '@material-ui/core' import { Close } from '@material-ui/icons' import { Alert, AlertProps, AlertTitle } from '@material-ui/lab' import React, { useState } from 'react' export const AppAlert = ({ message, severity = 'info', title, }: { message: string severity?: AlertProps['severity'] title?: string }) => { const [showAlert, setShowAlert] = useState(true) return showAlert ? ( setShowAlert(false)}> } > {title} {message} ) : null }