2023-11-16 16:41:25 +00:00
|
|
|
import { QuizQuestionNumber } from "@model/questionTypes/number";
|
2023-03-31 15:48:49 +00:00
|
|
|
import BranchingQuestions from "../branchingQuestions";
|
2023-11-16 16:41:25 +00:00
|
|
|
import HelpQuestions from "../helpQuestions";
|
2023-03-31 15:48:49 +00:00
|
|
|
import SettingSlider from "./settingSlider";
|
|
|
|
|
2023-11-16 16:41:25 +00:00
|
|
|
|
2023-03-31 15:48:49 +00:00
|
|
|
interface Props {
|
2023-11-16 16:41:25 +00:00
|
|
|
switchState: string;
|
|
|
|
question: QuizQuestionNumber;
|
2023-03-31 15:48:49 +00:00
|
|
|
}
|
|
|
|
|
2023-08-24 11:09:47 +00:00
|
|
|
export default function SwitchSlider({
|
2023-11-16 16:41:25 +00:00
|
|
|
switchState = "setting",
|
|
|
|
question,
|
2023-08-24 11:09:47 +00:00
|
|
|
}: Props) {
|
2023-11-16 16:41:25 +00:00
|
|
|
switch (switchState) {
|
|
|
|
case "setting":
|
|
|
|
return <SettingSlider question={question} />;
|
|
|
|
case "help":
|
|
|
|
return <HelpQuestions question={question} />;
|
|
|
|
case "branching":
|
|
|
|
return <BranchingQuestions question={question} />;
|
|
|
|
default:
|
|
|
|
return <></>;
|
|
|
|
}
|
2023-08-24 11:09:47 +00:00
|
|
|
}
|