textarea/input based on role in example components modal thing

This commit is contained in:
Ozbolt Menegatti 2020-03-19 21:33:53 +01:00
parent 4e744db68f
commit efdbd88434

View File

@ -66,6 +66,10 @@ def edit_example(example, sense):
color_class = ".example-component-" + role_txt
left = [h("span" + color_class, {}, role_txt)]
if component.role is None:
middle = [h("textarea.example-component-text", {"props": {"value": component.text}}, "")]
else:
middle = [h("input.example-component-text", {"props": {"type": "text", "value": component.text}}, "")]
divs.append(h("div.flex.five.example-component", {}, [