2023-06-23 13:42:35 +00:00
|
|
|
|
import {
|
2023-10-19 15:14:07 +00:00
|
|
|
|
Button,
|
|
|
|
|
Modal,
|
|
|
|
|
Box,
|
|
|
|
|
useTheme,
|
|
|
|
|
Typography,
|
|
|
|
|
Table,
|
|
|
|
|
TableCell,
|
|
|
|
|
TableBody,
|
|
|
|
|
TableContainer,
|
|
|
|
|
TableRow,
|
|
|
|
|
IconButton,
|
|
|
|
|
Link,
|
2023-06-23 13:42:35 +00:00
|
|
|
|
} from "@mui/material";
|
2023-10-19 15:14:07 +00:00
|
|
|
|
import CloseIcon from "@mui/icons-material/Close";
|
2023-06-17 22:26:12 +00:00
|
|
|
|
import * as React from "react";
|
2023-10-19 15:14:07 +00:00
|
|
|
|
import { useState } from "react";
|
2023-06-17 22:26:12 +00:00
|
|
|
|
|
2023-10-19 15:14:07 +00:00
|
|
|
|
export default function ModalSizeImage() {
|
|
|
|
|
const theme = useTheme();
|
|
|
|
|
const [open, setOpen] = useState(false);
|
|
|
|
|
const handleOpen = () => setOpen(true);
|
|
|
|
|
const handleClose = () => setOpen(false);
|
2023-06-23 13:42:35 +00:00
|
|
|
|
|
2023-10-19 15:14:07 +00:00
|
|
|
|
function createData(name: string, size: string) {
|
|
|
|
|
return { name, size };
|
|
|
|
|
}
|
2023-06-23 13:42:35 +00:00
|
|
|
|
|
2023-10-19 15:14:07 +00:00
|
|
|
|
const rows = [
|
|
|
|
|
createData("Прямая ссылка/домен", "1792х1509 px"),
|
|
|
|
|
createData("Модальное окно на сайте", "1380х1300 px"),
|
|
|
|
|
createData("Во ВКонтакте", "1166х1200 px"),
|
|
|
|
|
createData("Версия для планшета", "767х220 px"),
|
|
|
|
|
createData("Мобильная версия", "400х220 px"),
|
|
|
|
|
createData("Картинка для дизайна Centered", "900х490 px"),
|
|
|
|
|
createData("Картинка для дизайна Expanded", "1920х1080 px"),
|
|
|
|
|
];
|
2023-06-23 13:42:35 +00:00
|
|
|
|
|
2023-10-19 15:14:07 +00:00
|
|
|
|
const rows2 = [
|
|
|
|
|
createData("Вертикальный вариант", "180х240 px"),
|
|
|
|
|
createData("Квадратные", "240х240 px"),
|
|
|
|
|
createData("Варианты и картинка", "380х307 px"),
|
|
|
|
|
createData("Консультант", "140х140 px"),
|
|
|
|
|
createData("Логотип", "107х37 px"),
|
|
|
|
|
createData("", "1100х600 px"),
|
|
|
|
|
createData("Бонус", "200х60 px"),
|
|
|
|
|
createData('Картинка для формата вопроса "Страница"', "860х1250 px"),
|
|
|
|
|
];
|
2023-06-23 13:42:35 +00:00
|
|
|
|
|
2023-10-19 15:14:07 +00:00
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Link
|
|
|
|
|
component="button"
|
|
|
|
|
sx={{
|
|
|
|
|
mt: "20px",
|
|
|
|
|
fontSize: "16px",
|
|
|
|
|
lineHeight: "19px",
|
|
|
|
|
textAlign: "left",
|
|
|
|
|
color: theme.palette.orange.main,
|
|
|
|
|
textDecorationColor: theme.palette.orange.main,
|
|
|
|
|
}}
|
|
|
|
|
onClick={handleOpen}
|
|
|
|
|
>
|
|
|
|
|
Размер картинок
|
|
|
|
|
</Link>
|
|
|
|
|
<Modal
|
|
|
|
|
open={open}
|
|
|
|
|
onClose={handleClose}
|
|
|
|
|
aria-labelledby="modal-modal-title"
|
|
|
|
|
aria-describedby="modal-modal-description"
|
|
|
|
|
>
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
position: "absolute" as "absolute",
|
|
|
|
|
top: "50%",
|
|
|
|
|
left: "50%",
|
|
|
|
|
transform: "translate(-50%, -50%)",
|
|
|
|
|
maxWidth: "540px",
|
|
|
|
|
width: "100%",
|
|
|
|
|
minHeight: "632px",
|
|
|
|
|
bgcolor: "background.paper",
|
|
|
|
|
borderRadius: "12px",
|
|
|
|
|
boxShadow: 24,
|
|
|
|
|
p: 0,
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
justifyContent: "space-between",
|
|
|
|
|
alignItems: "baseline",
|
|
|
|
|
backgroundColor: theme.palette.background.default,
|
|
|
|
|
padding: "10px 9px 17px 20px",
|
|
|
|
|
borderRadius: "12px 12px 0px 0px",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Typography variant={"h5"}>Размеры картинок</Typography>
|
|
|
|
|
<IconButton onClick={handleClose}>
|
|
|
|
|
<CloseIcon />
|
|
|
|
|
</IconButton>
|
|
|
|
|
</Box>
|
|
|
|
|
<Box sx={{ padding: "15px 20px 0px" }}>
|
|
|
|
|
<Typography
|
|
|
|
|
variant={"body2"}
|
|
|
|
|
sx={{ color: theme.palette.grey2.main, fontWeight: 400 }}
|
|
|
|
|
>
|
|
|
|
|
Рекомендованный размер зависит от того, как вы будете чаще
|
|
|
|
|
использовать квиз:
|
|
|
|
|
</Typography>
|
|
|
|
|
</Box>
|
|
|
|
|
<Box sx={{ padding: "15px 40px 30px" }}>
|
2023-10-31 11:29:15 +00:00
|
|
|
|
{rows.map(({ name, size }, index) => (
|
2023-10-19 15:14:07 +00:00
|
|
|
|
<Box
|
2023-10-31 11:29:15 +00:00
|
|
|
|
key={name || index}
|
2023-06-17 22:26:12 +00:00
|
|
|
|
sx={{
|
2023-10-19 15:14:07 +00:00
|
|
|
|
display: "flex",
|
|
|
|
|
justifyContent: "space-between",
|
|
|
|
|
width: "100%",
|
|
|
|
|
paddingBottom: "5px",
|
2023-06-17 22:26:12 +00:00
|
|
|
|
}}
|
2023-10-19 15:14:07 +00:00
|
|
|
|
>
|
|
|
|
|
<Box sx={{ display: "block ruby", height: "20px" }}>
|
|
|
|
|
<Typography variant={"body2"} fontWeight={400}>
|
2023-10-31 11:29:15 +00:00
|
|
|
|
{name}
|
2023-10-19 15:14:07 +00:00
|
|
|
|
</Typography>
|
|
|
|
|
</Box>
|
2023-06-17 22:26:12 +00:00
|
|
|
|
<Box
|
2023-10-19 15:14:07 +00:00
|
|
|
|
sx={{
|
|
|
|
|
borderBottom: "solid 1px #F2F3F7",
|
|
|
|
|
width: "100%",
|
|
|
|
|
margin: "0 7px",
|
|
|
|
|
}}
|
|
|
|
|
></Box>
|
|
|
|
|
<Box sx={{ display: "block ruby", height: "20px" }}>
|
2023-10-31 11:29:15 +00:00
|
|
|
|
<Typography variant={"body2"}>{size}</Typography>
|
2023-06-17 22:26:12 +00:00
|
|
|
|
</Box>
|
2023-10-19 15:14:07 +00:00
|
|
|
|
</Box>
|
|
|
|
|
))}
|
|
|
|
|
</Box>
|
2023-06-17 22:26:12 +00:00
|
|
|
|
|
2023-10-19 15:14:07 +00:00
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
backgroundColor: theme.palette.background.default,
|
|
|
|
|
padding: "20px",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Typography variant={"h5"}>Размеры изображений в квизе</Typography>
|
|
|
|
|
</Box>
|
|
|
|
|
<Box sx={{ padding: "15px 40px 20px" }}>
|
2023-10-31 11:29:15 +00:00
|
|
|
|
{rows2.map(({ name, size }, index) => (
|
2023-10-19 15:14:07 +00:00
|
|
|
|
<Box
|
2023-10-31 11:29:15 +00:00
|
|
|
|
key={name || index}
|
2023-10-19 15:14:07 +00:00
|
|
|
|
sx={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
justifyContent: "space-between",
|
|
|
|
|
width: "100%",
|
|
|
|
|
paddingBottom: "5px",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Box sx={{ display: "block ruby", height: "20px" }}>
|
|
|
|
|
<Typography variant={"body2"} fontWeight={400}>
|
2023-10-31 11:29:15 +00:00
|
|
|
|
{name}
|
2023-10-19 15:14:07 +00:00
|
|
|
|
</Typography>
|
|
|
|
|
</Box>
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
borderBottom: "solid 1px #F2F3F7",
|
|
|
|
|
width: "100%",
|
|
|
|
|
margin: "0 7px",
|
|
|
|
|
}}
|
|
|
|
|
></Box>
|
|
|
|
|
<Box sx={{ display: "block ruby", height: "20px" }}>
|
2023-10-31 11:29:15 +00:00
|
|
|
|
<Typography variant={"body2"}>{size}</Typography>
|
2023-10-19 15:14:07 +00:00
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
|
|
|
|
))}
|
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
|
|
|
|
</Modal>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
}
|