annotate demo/src/my-element.ts @ 99:faf7e432f089

WIP build setup
author drewp@bigasterisk.com
date Fri, 11 Feb 2022 22:21:51 -0800
parents 4d19a94906d2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
89
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
1 import { html, css, LitElement } from "lit";
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
2 import { customElement } from "lit/decorators.js";
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
3 export { StreamedGraph } from "@bigasterisk/streamed-graph";
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
4
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
5 @customElement("my-element")
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
6 export class MyElement extends LitElement {
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
7 static styles = css`
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
8 :host {
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
9 }
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
10 `;
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
11
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
12 render() {
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
13 return html`
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
14 <h1>streamed-graph demo</h1>
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
15 <streamed-graph
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
16 url="/collector/graph/reposync"
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
17 view="repos.n3"
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
18 expanded="true"
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
19 ></streamed-graph>
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
20 `;
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
21 }
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
22 }
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
23
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
24 declare global {
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
25 interface HTMLElementTagNameMap {
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
26 "my-element": MyElement;
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
27 }
4d19a94906d2 redo demo/ with vitejs (so nice)
drewp@bigasterisk.com
parents:
diff changeset
28 }