new component for notifications

This commit is contained in:
chip committed 2020-11-03 12:35:12 +01:00
1 parent a804aede81
commit bf2a991ebc
1 file changed
+24
@@ -0,0 +1,24 @@
import React, { useState } from 'react'
import MuiAlert from '@material-ui/lab/Alert';
import Notification from '../../../../ui/components/Notification';
import { useBankAlert } from '../../hooks/useBankAlert';
import Snackbar from '@material-ui/core/Snackbar';
export const BankAlert = () => {
const [ open, setOpen ] = useState(false);
const { bankAlert, setBankAlert } = useBankAlert()
const _handleClose = () => {
setOpen(false)
}
return (
<Snackbar style={{ width: '80%' }} open={open} autoHideDuration={6000} onClose={_handleClose}>
<MuiAlert style={{ background: '#388CF8' }} onClose={_handleClose} severity="success">
You transferrred money
</MuiAlert>
</Snackbar>
)
}