From 6be3966bab893f7c6471b6b66f3bff3e26ddc965 Mon Sep 17 00:00:00 2001 From: Kristoffer Juelsen Date: Wed, 6 Apr 2022 14:13:46 +0200 Subject: [PATCH] Created SnackBar Co-authored-by: SgtPodding --- src/client/src/components/ErrorSnackbar.js | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/client/src/components/ErrorSnackbar.js diff --git a/src/client/src/components/ErrorSnackbar.js b/src/client/src/components/ErrorSnackbar.js new file mode 100644 index 0000000..6c39763 --- /dev/null +++ b/src/client/src/components/ErrorSnackbar.js @@ -0,0 +1,29 @@ +import * as React from 'react'; +import Stack from '@mui/material/Stack'; +import Button from '@mui/material/Button'; +import Snackbar from '@mui/material/Snackbar'; +import MuiAlert from '@mui/material/Alert'; + +const Alert = React.forwardRef(function Alert(props, ref) { + return ; +}); + +export default function showError(props) { + const handleClose = (event, reason) => { + if (reason === 'clickaway') { + return; + } + + props.setOpen(false); + }; + + return ( + + + + {props.message} + + + + ); +}