complete toast and notification for keeping data in local storage for filtering and move on next step
This commit is contained in:
47
src/core/components/NotificationDesign/AskForKeep.jsx
Normal file
47
src/core/components/NotificationDesign/AskForKeep.jsx
Normal file
@@ -0,0 +1,47 @@
|
||||
'use client'
|
||||
|
||||
import BeenhereIcon from '@mui/icons-material/Beenhere';
|
||||
import {Box, Button, Typography} from "@mui/material";
|
||||
import DownloadIcon from '@mui/icons-material/Download';
|
||||
import {toast} from "react-toastify";
|
||||
|
||||
function AskForKeep({onSaveFilter}) {
|
||||
|
||||
const handleDismiss = () => {
|
||||
toast.dismiss({containerId: "filtering"});
|
||||
};
|
||||
|
||||
return (
|
||||
<Box sx={{width: "100%"}}>
|
||||
<Box sx={{display: "flex", alignItems: "center", justifyContent: "space-between", mb: 1}}>
|
||||
<Typography color="#16534a" variant="subtitle1" sx={{fontWeight: "500"}}>
|
||||
ذخیره سازی اطلاعات
|
||||
</Typography>
|
||||
<BeenhereIcon sx={{color: "#16534a"}}/>
|
||||
</Box>
|
||||
<Box sx={{display: "flex", flexDirection: "column"}}>
|
||||
<Typography variant="caption">
|
||||
آیا مایل به ذخیره فیلتر های اعمال شده برای دفعات بعد هستید؟
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box sx={{display: "flex", gap: 1, mt: 1}}>
|
||||
<Button variant="contained" onClick={handleDismiss} sx={{
|
||||
backgroundColor: "#792626",
|
||||
':hover': {backgroundColor: "#792626"},
|
||||
boxShadow: "rgba(0, 0, 0, 0.23) 0px 6px 6px, rgba(0, 0, 0, 0.19) 10px 0px 20px",
|
||||
}}>رد
|
||||
کردن</Button>
|
||||
<Button variant="contained" component="label" endIcon={<DownloadIcon/>}
|
||||
onClick={onSaveFilter}
|
||||
sx={{
|
||||
backgroundColor: "#16534a",
|
||||
':hover': {backgroundColor: "#16534a"},
|
||||
boxShadow: "rgba(0, 0, 0, 0.23) 0px 6px 6px, rgba(0, 0, 0, 0.19) 10px 0px 20px",
|
||||
}}>ذخیره
|
||||
فیلتر</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
export default AskForKeep;
|
||||
Reference in New Issue
Block a user