2023-08-25 10:27:43 +00:00
|
|
|
|
import { Box, Typography } from "@mui/material";
|
2023-03-31 15:48:49 +00:00
|
|
|
|
import CustomCheckbox from "@ui_kit/CustomCheckbox";
|
|
|
|
|
import CustomTextField from "@ui_kit/CustomTextField";
|
2023-08-25 10:27:43 +00:00
|
|
|
|
|
|
|
|
|
import { questionStore, updateQuestionsList } from "@root/questions";
|
|
|
|
|
|
2023-05-03 19:21:00 +00:00
|
|
|
|
import InfoIcon from "../../../assets/icons/InfoIcon";
|
2023-03-31 15:48:49 +00:00
|
|
|
|
|
2023-08-25 10:27:43 +00:00
|
|
|
|
type SettingDropDownProps = {
|
|
|
|
|
totalIndex: number;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default function SettingDropDown({ totalIndex }: SettingDropDownProps) {
|
|
|
|
|
const { listQuestions } = questionStore();
|
2023-03-31 15:48:49 +00:00
|
|
|
|
|
2023-08-25 10:27:43 +00:00
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Box
|
|
|
|
|
sx={{ display: "flex", width: "100%", justifyContent: "space-between" }}
|
|
|
|
|
>
|
|
|
|
|
<Box sx={{ padding: "20px", width: "100%" }}>
|
|
|
|
|
<Typography sx={{ marginBottom: "15px" }}>
|
|
|
|
|
Настройки ответов
|
|
|
|
|
</Typography>
|
|
|
|
|
<CustomCheckbox label={"Можно несколько"} />
|
|
|
|
|
<Typography sx={{ marginBottom: "15px" }}>
|
|
|
|
|
Текст в выпадающем списке
|
|
|
|
|
</Typography>
|
|
|
|
|
<CustomTextField
|
|
|
|
|
placeholder={"Выберите вариант"}
|
|
|
|
|
text={listQuestions[totalIndex].content.default}
|
|
|
|
|
onChange={({ target }) => {
|
|
|
|
|
const clonContent = listQuestions[totalIndex].content;
|
|
|
|
|
clonContent.default = target.value;
|
|
|
|
|
updateQuestionsList(totalIndex, { content: clonContent });
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Box>
|
|
|
|
|
<Box sx={{ padding: "20px" }}>
|
|
|
|
|
<Typography sx={{ marginBottom: "15px" }}>
|
|
|
|
|
Настройки вопросов
|
|
|
|
|
</Typography>
|
|
|
|
|
<CustomCheckbox label={"Необязательный вопрос"} />
|
|
|
|
|
<CustomCheckbox label={"Внутреннее название вопроса"} /> <InfoIcon />
|
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
}
|