import { Alert, AlertColor, AlertTitle, Slide, SlideProps, Snackbar, SnackbarCloseReason, } from "@mui/material"; type TransitionProps = Omit; function TransitionDown(props: TransitionProps) { return ; } export type NotificationType = AlertColor; export type NotificationConfig = { open: boolean; message: string; title?: string; type?: NotificationType; }; type NotificationProps = { onClose: () => void; } & NotificationConfig; export default function Notification(props: NotificationProps) { const { open, message, title, type = "info", onClose } = props; function handleClose( _: React.SyntheticEvent | Event, reason?: SnackbarCloseReason ) { if (reason === "clickaway") { return; } onClose(); } return ( {title && {title}} {message} ); }