adminFront/src/Components/ModalWindow/index.tsx

131 lines
4.4 KiB
TypeScript
Raw Normal View History

2022-09-12 13:28:56 +00:00
import * as React from "react";
2022-09-14 10:24:02 +00:00
import { useNavigate } from "react-router-dom";
import { Box, Modal, Fade, Backdrop, Typography } from "@mui/material";
2022-09-12 13:28:56 +00:00
import theme from "../../theme";
2022-09-14 10:24:02 +00:00
import useStore from "../../store";
2022-09-12 13:28:56 +00:00
const ModalWindow: React.FC = () => {
2022-09-14 10:24:02 +00:00
const open = useStore((state) => state.open);
// const handleClose = useStore((state) => state.handleClose);
const navigate = useNavigate();
2022-09-12 13:28:56 +00:00
return (
<React.Fragment>
2022-09-14 10:24:02 +00:00
<Modal
aria-labelledby="transition-modal-title"
aria-describedby="transition-modal-description"
open={ open }
onClose={ () => navigate(-1) }
closeAfterTransition
BackdropComponent={Backdrop}
BackdropProps={{
timeout: 500,
}}
>
<Fade in={open}>
2022-09-12 13:28:56 +00:00
<Box sx={{
2022-09-14 10:24:02 +00:00
position: "absolute" as "absolute",
top: "50%",
left: "50%",
transform: "translate(-50%, -50%)",
width: "90%",
height: "90%",
bgcolor: theme.palette.menu.main,
boxShadow: 24,
color: theme.palette.secondary.main,
display: "flex",
flexDirection: "column",
alignItems: "center",
2022-09-12 13:28:56 +00:00
}}>
2022-09-14 10:24:02 +00:00
<Typography id="transition-modal-title" variant="caption">
Проект
</Typography>
2022-09-12 13:28:56 +00:00
<Box sx={{
2022-09-14 10:24:02 +00:00
width: "100%",
marginTop: "15px",
display: "flex"
2022-09-12 13:28:56 +00:00
}}>
2022-09-14 10:24:02 +00:00
<Box sx={{
2022-09-12 13:28:56 +00:00
backgroundColor: theme.palette.grayMedium.main,
2022-09-14 10:24:02 +00:00
width: "155px"
2022-09-12 13:28:56 +00:00
}}>
2022-09-14 10:24:02 +00:00
<Typography variant="h4" sx={{
backgroundColor: theme.palette.grayMedium.main,
width: "100%",
height: "55px", //205px
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
cursor: "pointer",
}}>
СТАТИСТИКА
</Typography>
<Typography variant="h4" sx={{
backgroundColor: theme.palette.grayMedium.main,
color: theme.palette.grayDisabled.main,
width: "100%",
height: "55px", //205px
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
cursor: "pointer",
textAlign: "center"
}}>
ТРЕКЕРЫ УСТРОЙСТВ
</Typography>
<Typography variant="h4" sx={{
backgroundColor: theme.palette.grayMedium.main,
color: theme.palette.grayDisabled.main,
width: "100%",
height: "55px", //205px
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
cursor: "pointer",
textAlign: "center"
}}>
ВВОДЫ
</Typography>
<Typography variant="h4" sx={{
backgroundColor: theme.palette.grayMedium.main,
color: theme.palette.grayDisabled.main,
width: "100%",
height: "55px", //205px
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
cursor: "pointer",
textAlign: "center"
}}>
ВЫВОДЫ
</Typography>
</Box>
<Box sx={{
2022-09-13 16:16:57 +00:00
backgroundColor: theme.palette.grayMedium.main,
2022-09-14 10:24:02 +00:00
width: "calc(100% - 155px)",
height: "55px",
2022-09-13 16:16:57 +00:00
display: "flex",
flexDirection: "column",
justifyContent: "center",
2022-09-14 10:24:02 +00:00
alignItems: "center"
2022-09-13 16:16:57 +00:00
}}>
2022-09-14 10:24:02 +00:00
Long text Long text Long text Long text Long text
Long text Long text Long text Long text Long text
Long text Long text Long text
</Box>
2022-09-12 13:28:56 +00:00
</Box>
</Box>
2022-09-14 10:24:02 +00:00
</Fade>
</Modal>
2022-09-12 13:28:56 +00:00
</React.Fragment>
);
}
2022-09-13 16:16:57 +00:00
2022-09-12 13:28:56 +00:00
export default ModalWindow;