fix добавьте ответ & у varimg есть многострочн ответ
This commit is contained in:
parent
3e10a41504
commit
cb11510744
@ -16,7 +16,7 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function DropDown({ question, openBranchingPage, setOpenBranchingPage }: Props) {
|
export default function DropDown({ question, openBranchingPage, setOpenBranchingPage }: Props) {
|
||||||
const onClickAddAnAnswer = useAddAnswer();
|
const {onClickAddAnAnswer} = useAddAnswer();
|
||||||
const [switchState, setSwitchState] = useState("setting");
|
const [switchState, setSwitchState] = useState("setting");
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const isMobile = useMediaQuery(theme.breakpoints.down(790));
|
const isMobile = useMediaQuery(theme.breakpoints.down(790));
|
||||||
|
@ -19,7 +19,7 @@ type SettingOptionsAndPictProps = {
|
|||||||
|
|
||||||
const SettingOptionsAndPict = memo<SettingOptionsAndPictProps>(function ({ question, questionId, ownPlaceholder, isMulti, isLargeCheck, replText, isRequired, isOwn }) {
|
const SettingOptionsAndPict = memo<SettingOptionsAndPictProps>(function ({ question, questionId, ownPlaceholder, isMulti, isLargeCheck, replText, isRequired, isOwn }) {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const {switchOwn} = useAddAnswer();
|
const { switchOwn } = useAddAnswer();
|
||||||
|
|
||||||
const isWrappColumn = useMediaQuery(theme.breakpoints.down(980));
|
const isWrappColumn = useMediaQuery(theme.breakpoints.down(980));
|
||||||
const isFigmaTablte = useMediaQuery(theme.breakpoints.down(990));
|
const isFigmaTablte = useMediaQuery(theme.breakpoints.down(990));
|
||||||
@ -67,15 +67,26 @@ const SettingOptionsAndPict = memo<SettingOptionsAndPictProps>(function ({ quest
|
|||||||
>
|
>
|
||||||
Настройки ответов
|
Настройки ответов
|
||||||
</Typography>
|
</Typography>
|
||||||
<CustomCheckbox
|
<CustomCheckbox
|
||||||
dataCy="checkbox-own-answer"
|
dataCy="checkbox-own-answer"
|
||||||
sx={{ mr: isMobile ? "0px" : "16px" }}
|
sx={{ mr: isMobile ? "0px" : "16px" }}
|
||||||
label={'Вариант "свой ответ"'}
|
label={'Вариант "свой ответ"'}
|
||||||
checked={isOwn}
|
checked={isOwn}
|
||||||
handleChange={({ target }) => {
|
handleChange={({ target }) => {
|
||||||
switchOwn({question, checked:target.checked})
|
switchOwn({ question, checked: target.checked })
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<CustomCheckbox
|
||||||
|
dataCy="checkbox-long-text-answer"
|
||||||
|
sx={{ mr: isMobile ? "0px" : "16px" }}
|
||||||
|
label={"Многострочный ответ"}
|
||||||
|
checked={isLargeCheck}
|
||||||
|
handleChange={({ target }) => {
|
||||||
|
updateQuestion<QuizQuestionVariant>(questionId, (question) => {
|
||||||
|
question.content.largeCheck = target.checked;
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
{!isWrappColumn && (
|
{!isWrappColumn && (
|
||||||
<Box sx={{ mt: isMobile ? "11px" : "6px", width: "100%" }}>
|
<Box sx={{ mt: isMobile ? "11px" : "6px", width: "100%" }}>
|
||||||
<Typography
|
<Typography
|
||||||
@ -119,6 +130,7 @@ const SettingOptionsAndPict = memo<SettingOptionsAndPictProps>(function ({ quest
|
|||||||
fontWeight: "500",
|
fontWeight: "500",
|
||||||
fontSize: "18px",
|
fontSize: "18px",
|
||||||
color: " #4D4D4D",
|
color: " #4D4D4D",
|
||||||
|
mt: isMobile ? "10px" : ""
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Настройки вопросов
|
Настройки вопросов
|
||||||
|
@ -21,7 +21,7 @@ interface Props {
|
|||||||
|
|
||||||
export default function OptionsPicture({ question, openBranchingPage, setOpenBranchingPage }: Props) {
|
export default function OptionsPicture({ question, openBranchingPage, setOpenBranchingPage }: Props) {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const onClickAddAnAnswer = useAddAnswer();
|
const {onClickAddAnAnswer} = useAddAnswer();
|
||||||
const quizQid = useCurrentQuiz()?.qid;
|
const quizQid = useCurrentQuiz()?.qid;
|
||||||
const [pictureUploding, setPictureUploading] = useState<boolean>(false);
|
const [pictureUploding, setPictureUploading] = useState<boolean>(false);
|
||||||
const [selectedVariantId, setSelectedVariantId] = useState<string | null>(null);
|
const [selectedVariantId, setSelectedVariantId] = useState<string | null>(null);
|
||||||
|
@ -15,7 +15,7 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function AnswerOptions({ question, openBranchingPage, setOpenBranchingPage }: Props) {
|
export default function AnswerOptions({ question, openBranchingPage, setOpenBranchingPage }: Props) {
|
||||||
const onClickAddAnAnswer = useAddAnswer();
|
const {onClickAddAnAnswer} = useAddAnswer();
|
||||||
const [switchState, setSwitchState] = useState("setting");
|
const [switchState, setSwitchState] = useState("setting");
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const isMobile = useMediaQuery(theme.breakpoints.down(790));
|
const isMobile = useMediaQuery(theme.breakpoints.down(790));
|
||||||
|
Loading…
Reference in New Issue
Block a user