diff options
| author | LLLL Colonq <llll@colonq> | 2024-01-12 14:54:22 -0500 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2024-01-12 14:54:32 -0500 |
| commit | 094d3e0e1370f2f8b3619ba6cea8b33ac83dceed (patch) | |
| tree | 01ae4f2706d32ef1433c60d60dcabb1e479be463 /fig-frontend/client/src/components/gizmo.ts | |
| parent | 45980c6910a7fe16ec41b1663b79cebc6e33350d (diff) | |
Update frontend
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> +`; + } + } +} |
