import { Box, Typography, useTheme } from "@mui/material"; import ButtonsOptions from "../ButtonsOptions"; import React from "react"; import CustomTextField from "@ui_kit/CustomTextField"; import SwitchSlider from "./switchSlider"; import { questionStore, updateQuestionsList } from "@root/questions"; interface Props { totalIndex: number; } export default function SliderOptions({ totalIndex }: Props) { const [switchState, setSwitchState] = React.useState("setting"); const { listQuestions } = questionStore(); const theme = useTheme(); const SSHC = (data: string) => { setSwitchState(data); }; return ( <> Выбор значения из диапазона { const clonContent = listQuestions[totalIndex].content; clonContent.range = `${target.value}—${ listQuestions[totalIndex].content.range.split("—")[1] }`; updateQuestionsList(totalIndex, { content: clonContent }); }} /> { const clonContent = listQuestions[totalIndex].content; clonContent.range = `${ listQuestions[totalIndex].content.range.split("—")[0] }—${target.value}`; updateQuestionsList(totalIndex, { content: clonContent }); }} /> Начальное значение { const clonContent = listQuestions[totalIndex].content; clonContent.start = Number(target.value); updateQuestionsList(totalIndex, { content: clonContent }); }} /> Шаг { const clonContent = listQuestions[totalIndex].content; clonContent.step = Number(target.value); updateQuestionsList(totalIndex, { content: clonContent }); }} /> ); }