Initial commit - restaurant dashboard
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import React from "react";
|
||||
import { Snackbar, Alert } from "@mui/material";
|
||||
|
||||
const CustomSnackbar = ({ open, message, severity, onClose }) => {
|
||||
return (
|
||||
<Snackbar
|
||||
open={open}
|
||||
autoHideDuration={4000}
|
||||
onClose={onClose}
|
||||
anchorOrigin={{ vertical: "bottom", horizontal: "center" }}
|
||||
>
|
||||
<Alert
|
||||
onClose={onClose}
|
||||
severity={severity}
|
||||
variant="filled"
|
||||
sx={{
|
||||
width: { xs: "40%", sm: "60%", md: "100%" },
|
||||
color: "white",
|
||||
fontSize: "16px",
|
||||
fontWeight: "500",
|
||||
backgroundColor: "#e57f3f", // ثابت حسب طلبك
|
||||
borderRadius: 6,
|
||||
mb: 6,
|
||||
}}
|
||||
>
|
||||
{message}
|
||||
</Alert>
|
||||
</Snackbar>
|
||||
);
|
||||
};
|
||||
|
||||
export default CustomSnackbar;
|
||||
Reference in New Issue
Block a user