2024-02-06 02:00:38 +00:00
|
|
|
|
import { Box, Button, Modal, Typography } from "@mui/material";
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
openDelete: boolean;
|
2024-02-26 14:22:40 +00:00
|
|
|
|
handleClose: () => void;
|
|
|
|
|
onClick: () => void;
|
2024-02-06 02:00:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-02-26 14:22:40 +00:00
|
|
|
|
export const DeleteModal = ({ openDelete, handleClose, onClick }: Props) => {
|
2024-02-06 02:00:38 +00:00
|
|
|
|
return (
|
2024-02-26 14:22:40 +00:00
|
|
|
|
<Modal open={openDelete} onClose={handleClose}>
|
2024-02-06 02:00:38 +00:00
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
position: "absolute",
|
|
|
|
|
top: "50%",
|
|
|
|
|
left: "50%",
|
|
|
|
|
transform: "translate(-50%, -50%)",
|
|
|
|
|
padding: "30px",
|
|
|
|
|
borderRadius: "10px",
|
|
|
|
|
background: "#FFFFFF",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Typography variant="h6" sx={{ textAlign: "center" }}>
|
|
|
|
|
Вы уверены, что хотите удалить этот результат?
|
|
|
|
|
</Typography>
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
marginTop: "30px",
|
|
|
|
|
display: "flex",
|
|
|
|
|
justifyContent: "center",
|
|
|
|
|
gap: "15px",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Button
|
|
|
|
|
variant="contained"
|
|
|
|
|
sx={{ minWidth: "150px" }}
|
2024-02-26 14:22:40 +00:00
|
|
|
|
onClick={handleClose}
|
2024-02-06 02:00:38 +00:00
|
|
|
|
>
|
|
|
|
|
Отмена
|
|
|
|
|
</Button>
|
|
|
|
|
<Button
|
|
|
|
|
variant="contained"
|
|
|
|
|
sx={{ minWidth: "150px" }}
|
2024-02-26 14:22:40 +00:00
|
|
|
|
onClick={onClick}
|
2024-02-06 02:00:38 +00:00
|
|
|
|
>
|
|
|
|
|
Подтвердить
|
|
|
|
|
</Button>
|
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
|
|
|
|
</Modal>
|
|
|
|
|
);
|
|
|
|
|
};
|