blob: bd1285cb75bc9a006199bb0f13c4ea4396ba02fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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>
`;
}
}
}
|