I have an input
viewof choice = Inputs.select(["Selection", "Text"], {label: "Input type", multiple: false})
I want a different widget to be displayed depending on that input.
{
if (choice === "Selection") {
viewof text = Inputs.select(["A","B"], {label: "Select text"});
} else if (choice === "Text") {
viewof text = Inputs.textarea({label: "Enter text", value: "Dummy text"});
}
}
${text}