import React from 'react'; import CloseIcon from '@material-ui/icons/Close'; import { Box, IconButton, makeStyles, Slide } from '@material-ui/core'; import { useNotifications } from '../hooks/useNotifications'; import { Alert, AlertTitle } from '@material-ui/lab'; const useStyles = makeStyles((theme) => ({ snackbar: { marginTop: '-710px', display: 'flex', justifyContent: 'center', alignItems: 'center', }, alert: { '& .MuiAlert-action': { top: theme.spacing(1), right: theme.spacing(2), position: 'absolute', }, position: 'relative', cursor: 'pointer', width: '370px', height: '120px', zIndex: 50, backgroundColor: theme.palette.background.paper, color: theme.palette.text.primary, '& .MuiAlert-icon': { color: theme.palette.text.primary, }, }, alertContent: { display: '-webkit-box', maxWidth: '360px', height: '60px', margin: '0 auto', '-webkit-line-clamp': 3, '-webkit-box-orient': 'vertical', overflow: 'hidden', textOverflow: 'ellipsis', }, })); export const NotificationAlert = () => { const classes = useStyles(); const { currentAlert } = useNotifications(); return (