diff options
Diffstat (limited to 'fig-frontend/client/src/components/gizmo.ts')
| -rw-r--r-- | fig-frontend/client/src/components/gizmo.ts | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/fig-frontend/client/src/components/gizmo.ts b/fig-frontend/client/src/components/gizmo.ts new file mode 100644 index 0000000..bd1285c --- /dev/null +++ b/fig-frontend/client/src/components/gizmo.ts @@ -0,0 +1,34 @@ +import { MobxLitElement } from "@adobe/lit-mobx"; +import { html, css } from "lit"; +import { customElement } from "lit/decorators.js"; + +import * as State from "../state"; + +@customElement("fig-gizmo") +export class Gizmo extends MobxLitElement { + private global = State.global; + + static style = css` +`; + + static get(id: string): Gizmo | null { + const e = document.getElementById(id); + if (e instanceof Gizmo) return e; + return null; + } + + constructor() { + super(); + } + + render() { + console.log("render", this.global.gizmo_active); + if (this.global.gizmo_active) { + return html` +<fig-window> +<h1>hi</h1> +</fig-window> +`; + } + } +} |
