39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { QuizQuestionImages } from "@frontend/squzanswerer";
|
|
import HelpQuestions from "../../helpQuestions";
|
|
import SettingOptionsPict from "./settingOptionsPict";
|
|
|
|
interface Props {
|
|
switchState: string;
|
|
question: QuizQuestionImages;
|
|
}
|
|
|
|
export default function SwitchAnswerOptionsPict({ switchState = "setting", question }: Props) {
|
|
switch (switchState) {
|
|
case "setting":
|
|
return (
|
|
<SettingOptionsPict
|
|
question={question}
|
|
questionId={question.id}
|
|
isRequired={question.content.required}
|
|
isMulti={question.content.multi}
|
|
isOwn={question.content.own}
|
|
proportions={question.content.xy}
|
|
format={question.content.format}
|
|
ownPlaceholder={question.content.ownPlaceholder}
|
|
isLargeCheck={question.content.isLargeCheck}
|
|
|
|
/>
|
|
);
|
|
case "help":
|
|
return (
|
|
<HelpQuestions
|
|
questionId={question.id}
|
|
hintText={question.content.hint.text}
|
|
hintVideo={question.content.hint.video}
|
|
/>
|
|
);
|
|
default:
|
|
return <></>;
|
|
}
|
|
}
|