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 { IMessage, INotification } from "./"; import { useStyles } from "./styles"; export interface IMessageManagerProps extends INotification { message: IMessage; onMouseEnter: () => void; onMouseLeave: () => void; } export const MessageManagerTemplate: React.FC = props => { const { close, onMouseEnter, onMouseLeave, options: { timeout }, message: { actionBtn, expandText, status = "info", title, text, onUndo } } = props; const [expand, setExpand] = useState(false); const classes = useStyles({}); return (
{title && ( {title} )} {text} } action={[ !!expandText ? (

{expandText}

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