frontPanel/src/pages/Questions/OwnTextField/switchTextField.tsx

29 lines
685 B
TypeScript
Raw Normal View History

2023-08-24 11:09:47 +00:00
import * as React from "react";
import BranchingQuestions from "../branchingQuestions";
import HelpQuestions from "../helpQuestions";
import SettingTextField from "./settingTextField";
interface Props {
2023-08-24 11:09:47 +00:00
switchState: string;
totalIndex: number;
}
2023-08-24 11:09:47 +00:00
export default function SwitchTextField({
switchState = "setting",
totalIndex,
}: Props) {
switch (switchState) {
case "setting":
2023-08-25 08:29:42 +00:00
return <SettingTextField totalIndex={totalIndex} />;
2023-08-24 11:09:47 +00:00
break;
case "help":
return <HelpQuestions totalIndex={totalIndex} />;
break;
case "branching":
2023-08-24 20:53:27 +00:00
return <BranchingQuestions totalIndex={totalIndex} />;
2023-08-24 11:09:47 +00:00
break;
default:
return <></>;
}
}