2024-06-30 15:32:16 +00:00
|
|
|
|
import { CustomRadioGroup } from "@/components/CustomRadioGroup/CustomRadioGroup"
|
|
|
|
|
|
import { Box, Typography } from "@mui/material"
|
|
|
|
|
|
import { MinifiedData } from "../types";
|
2024-06-28 19:34:13 +00:00
|
|
|
|
|
2024-06-30 15:32:16 +00:00
|
|
|
|
interface Props {
|
|
|
|
|
|
items: MinifiedData[];
|
|
|
|
|
|
fieldsItems: MinifiedData[];
|
|
|
|
|
|
currentField: string;
|
|
|
|
|
|
currentQuestion: string;
|
|
|
|
|
|
setCurrentField: (value: string) => void;
|
|
|
|
|
|
setCurrentQuestion: (value: string) => void;
|
|
|
|
|
|
}
|
|
|
|
|
|
export const NewFields = ({
|
|
|
|
|
|
items,
|
|
|
|
|
|
currentQuestion,
|
|
|
|
|
|
setCurrentQuestion,
|
|
|
|
|
|
}: Props) => {
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
<Box
|
|
|
|
|
|
sx={{
|
|
|
|
|
|
display: "inline-flex",
|
|
|
|
|
|
justifyContent: "space-between",
|
|
|
|
|
|
width: "100%",
|
2024-07-01 06:30:22 +00:00
|
|
|
|
height: "300px"
|
2024-06-30 15:32:16 +00:00
|
|
|
|
}}
|
|
|
|
|
|
>
|
|
|
|
|
|
<Box
|
|
|
|
|
|
sx={{
|
|
|
|
|
|
width: "100%"
|
|
|
|
|
|
}}
|
|
|
|
|
|
>
|
|
|
|
|
|
<Typography
|
|
|
|
|
|
sx={{
|
|
|
|
|
|
fontSize: "16px",
|
|
|
|
|
|
fontWeight: 400,
|
|
|
|
|
|
lineHeight: "18.96px",
|
|
|
|
|
|
textAlign: "left",
|
|
|
|
|
|
color: "#9A9AAF",
|
|
|
|
|
|
m: "15px 0 10px",
|
|
|
|
|
|
}}
|
|
|
|
|
|
>Выберите вопрос для поля. Название поля настроится автоматически</Typography>
|
|
|
|
|
|
<CustomRadioGroup
|
|
|
|
|
|
items={items}
|
|
|
|
|
|
selectedItemId={currentQuestion}
|
|
|
|
|
|
setSelectedItem={setCurrentQuestion}
|
|
|
|
|
|
handleScroll={() => { }}
|
|
|
|
|
|
activeScope={undefined}
|
|
|
|
|
|
/>
|
|
|
|
|
|
</Box>
|
|
|
|
|
|
</Box>
|
|
|
|
|
|
)
|
2024-06-28 19:34:13 +00:00
|
|
|
|
}
|