56 lines
1.5 KiB
TypeScript
56 lines
1.5 KiB
TypeScript
![]() |
import { Box, Button, Modal, Typography } from "@mui/material";
|
|||
|
|
|||
|
interface Props {
|
|||
|
openDelete: boolean;
|
|||
|
setOpenDelete: (open: boolean) => void;
|
|||
|
}
|
|||
|
|
|||
|
export const DeleteModal = ({ openDelete, setOpenDelete }: Props) => {
|
|||
|
return (
|
|||
|
<Modal open={openDelete} onClose={() => setOpenDelete(false)}>
|
|||
|
<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" }}
|
|||
|
onClick={() => setOpenDelete(false)}
|
|||
|
>
|
|||
|
Отмена
|
|||
|
</Button>
|
|||
|
<Button
|
|||
|
variant="contained"
|
|||
|
sx={{ minWidth: "150px" }}
|
|||
|
onClick={() => {
|
|||
|
// deleteQuestionWithTimeout(question.id, () =>
|
|||
|
// DeleteFunction(questions, question, quiz),
|
|||
|
// );
|
|||
|
}}
|
|||
|
>
|
|||
|
Подтвердить
|
|||
|
</Button>
|
|||
|
</Box>
|
|||
|
</Box>
|
|||
|
</Modal>
|
|||
|
);
|
|||
|
};
|