frontPanel/src/pages/Questions/QuestionOptions/OptionsPicture/switchOptionsPict.tsx

39 lines
1.1 KiB
TypeScript
Raw Normal View History

import { QuizQuestionImages } from "@frontend/squzanswerer";
2024-09-02 20:48:06 +00:00
import HelpQuestions from "../../helpQuestions";
import SettingOptionsPict from "./settingOptionsPict";
interface Props {
2023-12-31 02:53:25 +00:00
switchState: string;
question: QuizQuestionImages;
}
2024-05-29 16:41:41 +00:00
export default function SwitchAnswerOptionsPict({ switchState = "setting", question }: Props) {
2023-12-31 02:53:25 +00:00
switch (switchState) {
case "setting":
return (
<SettingOptionsPict
question={question}
questionId={question.id}
isRequired={question.content.required}
2024-05-29 16:41:41 +00:00
isMulti={question.content.multi}
isOwn={question.content.own}
proportions={question.content.xy}
format={question.content.format}
ownPlaceholder={question.content.ownPlaceholder}
isLargeCheck={question.content.isLargeCheck}
/>
);
2023-12-31 02:53:25 +00:00
case "help":
return (
<HelpQuestions
questionId={question.id}
hintText={question.content.hint.text}
hintVideo={question.content.hint.video}
/>
);
2023-12-31 02:53:25 +00:00
default:
return <></>;
}
2023-08-24 11:09:47 +00:00
}