frontPanel/src/components/ResultListForm.tsx

197 lines
6.3 KiB
TypeScript
Raw Normal View History

2023-04-15 09:10:59 +00:00
import { Box, IconButton, TextField, Typography } from "@mui/material";
import { SelectIconButton } from "../pages/Questions/OptionsPicture/settingOpytionsPict";
import { useState } from "react";
import FormatIcon2 from "../assets/icons/questionsPage/FormatIcon2";
import FormatIcon1 from "../assets/icons/questionsPage/FormatIcon1";
import Info from "../assets/icons/Info";
import ProportionsIcon21 from "../assets/icons/questionsPage/ProportionsIcon21";
import ProportionsIcon11 from "../assets/icons/questionsPage/ProportionsIcon11";
import ProportionsIcon12 from "../assets/icons/questionsPage/ProportionsIcon12";
2023-04-15 09:10:59 +00:00
2023-04-23 08:39:34 +00:00
export const ResultListForm = () => {
2023-04-15 09:10:59 +00:00
const [alignType, setAlignType] = useState<"left" | "right">("left");
const [proportions, setProportions] = useState<"oneOne" | "twoOne" | "oneTwo">("oneOne");
return (
<Box sx={{ width: "796px", mb: "30px" }}>
<Box
sx={{
height: "100%",
bgcolor: "#FFFFFF",
borderRadius: "12px",
p: "30px 20px",
}}
>
<Box
sx={{
display: "flex",
alignItems: "center",
justifyContent: "space-between",
mb: "20px",
}}
>
<Typography sx={{ color: "#9A9AAF" }}>Показывать результат</Typography>
<IconButton>
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="30" height="30" rx="6" fill="#EEE4FC" />
<path
d="M22.5 11.25L15 18.75L7.5 11.25"
stroke="#7E2AEA"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
2023-04-15 09:10:59 +00:00
/>
</svg>
</IconButton>
</Box>
<Box sx={{ display: "flex" }}>
<Box>
<Typography sx={{ mb: "14px" }}>Форма</Typography>
<Box
sx={{
display: "flex",
gap: "10px",
marginBottom: "20px",
}}
>
<SelectIconButton
onClick={() => setAlignType("left")}
isActive={alignType === "left"}
Icon={FormatIcon2}
/>
<SelectIconButton
onClick={() => setAlignType("right")}
isActive={alignType === "right"}
Icon={FormatIcon1}
/>
</Box>
</Box>
<Box sx={{ ml: "40px" }}>
<Typography sx={{ mb: "14px" }}>Пропорции</Typography>
<Box
sx={{
display: "flex",
gap: "10px",
marginBottom: "20px",
}}
>
<SelectIconButton
onClick={() => setProportions("oneOne")}
isActive={proportions === "oneOne"}
Icon={ProportionsIcon11}
/>
<SelectIconButton
onClick={() => setProportions("twoOne")}
isActive={proportions === "twoOne"}
Icon={ProportionsIcon21}
/>
<SelectIconButton
onClick={() => setProportions("oneTwo")}
isActive={proportions === "oneTwo"}
Icon={ProportionsIcon12}
/>
</Box>
</Box>
</Box>
<Box sx={{ mb: "20px" }}>
<Typography sx={{ pb: "14px" }} component="p">
Заголовок
</Typography>
<TextField
placeholder="Ваши результаты"
fullWidth
sx={{
alignItems: "center",
"& .MuiInputBase-root": {
backgroundColor: "#F2F3F7",
width: "100%",
height: "48px",
borderRadius: "10px",
},
}}
inputProps={{
sx: {
borderRadius: "10px",
fontSize: "18px",
lineHeight: "21px",
py: 0,
},
}}
/>
</Box>
<Box sx={{ mb: "20px" }}>
<Typography sx={{ pb: "14px" }} component="p">
Текст
</Typography>
<TextField
placeholder="Ваши результаты"
fullWidth
sx={{
alignItems: "center",
"& .MuiInputBase-root": {
backgroundColor: "#F2F3F7",
width: "100%",
height: "69px",
borderRadius: "10px",
},
}}
inputProps={{
sx: {
borderRadius: "10px",
fontSize: "18px",
lineHeight: "21px",
py: 0,
},
}}
/>
</Box>
<Box>
<Typography sx={{ pb: "14px" }} component="p">
Кнопка на результате
</Typography>
<TextField
placeholder="Ваши результаты"
fullWidth
sx={{
alignItems: "center",
"& .MuiInputBase-root": {
backgroundColor: "#F2F3F7",
width: "100%",
height: "48px",
borderRadius: "10px",
},
}}
inputProps={{
sx: {
borderRadius: "10px",
fontSize: "18px",
lineHeight: "21px",
py: 0,
},
}}
/>
</Box>
<Box sx={{ mt: "20px", display: "flex", alignItems: "center" }}>
<IconButton sx={{ width: "26px", height: "26px", bgcolor: "#7E2AEA", borderRadius: "6px" }}>
<svg width="18" height="13" viewBox="0 0 18 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M16.75 1L6.25 11.5L1 6.25"
stroke="white"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</IconButton>
<Typography sx={{ color: "#9A9AAF", p: "0 13px" }} component="p">
Кнопка "Не знаю, что выбрать"
</Typography>
<Info />
</Box>
</Box>
</Box>
);
2023-04-23 08:39:34 +00:00
};