summaryrefslogtreecommitdiff
path: root/web/src/components/toolbar/index.ts
blob: d844a69f6020da82f83d9db9777137564a05bfda (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
import h, { CreateElement } from "../../html";
import "./index.css";

class NotiveToolbarElement extends HTMLElement {
  connectedCallback() {
    this.append(
      h.section(
        h.button({ dataset: { variant: "menu" } }, "File"),
        h.button({ dataset: { variant: "menu" } }, "Edit"),
        h.button({ dataset: { variant: "menu" } }, "Format"),
      ),
      h.section(
        h.button({ dataset: { variant: "icon" } }, "-"),
        h.input({ type: "text", value: "1" }),
        h.button({ dataset: { variant: "icon" } }, "+"),
      ),
    );
  }
}

customElements.define("ntv-toolbar", NotiveToolbarElement);

export default ((...args: any[]): NotiveToolbarElement =>
  (h as any)["ntv-toolbar"](...args)) as CreateElement<NotiveToolbarElement>;