import Button from "@material-ui/core/Button"; import IconButton from "@material-ui/core/IconButton"; import SnackbarContent from "@material-ui/core/SnackbarContent"; import Typography from "@material-ui/core/Typography"; import CloseIcon from "@material-ui/icons/Close"; import classNames from "classnames"; import React, { useState } from "react"; import { FormattedMessage } from "react-intl"; import { INotification } from "./"; import { useStyles } from "./styles"; export interface IMessageManagerProps extends INotification { onMouseEnter?: () => void; onMouseLeave?: () => void; } export const MessageManagerTemplate: React.FC = props => { const { close, onMouseEnter, onMouseLeave, message: { actionBtn, expandText, status = "info", title, text, onUndo }, timeout } = props; const [expand, setExpand] = useState(false); const classes = useStyles({}); const id = props.id.toString(); return (
{title && ( {title} )} {text} } action={[ !!expandText ? (

{expandText}

) : ( undefined ),
{!!onUndo && ( )} {!!actionBtn && ( )}
, ,
]} />
); };