##// END OF EJS Templates
Added test widgets to the playground
Added test widgets to the playground

File last commit:

r100:ff52224a63f0 v1.3
r100:ff52224a63f0 v1.3
Show More
MainWidget.tsx
21 lines | 639 B | text/x-typescript | TypeScriptLexer
import { djbase, djclass } from "@implab/djx/declare";
import { DjxWidgetBase } from "@implab/djx/tsx/DjxWidgetBase";
import { createElement } from "@implab/djx/tsx";
import ProgressBar from "./ProgressBar";
const ref = <W extends DjxWidgetBase, K extends keyof W>(target: W, name: K) => (v: W[K]) => target.set(name, v);
@djclass
export default class MainWidget extends djbase(DjxWidgetBase) {
titleNode?: HTMLHeadingElement;
progressBar?: ProgressBar;
render() {
return <div>
<h2 ref={ref(this, "titleNode")}>Hi!</h2>
<ProgressBar ref={ref(this, "progressBar")}/>
</div>;
}
}