audiogram-beta/js/app.js

33 lines
801 B
JavaScript
Raw Normal View History

2022-12-10 10:27:23 -05:00
import React from "react";
import {html} from "htm";
2022-12-04 16:19:22 -05:00
import * as TW from "./twind.js";
2022-12-03 19:05:26 -05:00
import * as UI from "./ui.js";
2022-12-05 23:22:37 -05:00
import * as Store from "./store.js";
2022-12-03 19:05:26 -05:00
2022-12-10 11:57:45 -05:00
// @ts-ignore:
2022-12-04 16:19:22 -05:00
const ShadowDOM = document.querySelector("#app").attachShadow({mode: "open"});
const ShadowDiv = document.createElement("div");
const ShadowCSS = document.createElement("style");
ShadowDOM.append(ShadowCSS);
ShadowDOM.append(ShadowDiv);
TW.Init(ShadowCSS, ShadowDiv);
2022-12-03 19:05:26 -05:00
React.render(html`
2022-12-05 23:22:37 -05:00
<${Store.Provider}>
2023-06-04 13:44:28 -04:00
<div class="max-w-[1170px] mx-auto">
2023-06-03 11:38:52 -04:00
2023-06-04 13:44:28 -04:00
<${UI.Header}/>
2022-12-11 22:57:07 -05:00
2023-06-04 13:44:28 -04:00
<div class="flex flex-col items-start lg:flex-row my-4">
<${UI.Controls}/>
2023-06-03 11:38:52 -04:00
<${UI.Chart}>
<${UI.Audiogram}/>
<//>
2022-12-11 22:57:07 -05:00
</div>
2022-12-11 23:33:22 -05:00
2023-06-04 13:44:28 -04:00
<${UI.Display}/>
</div>
2022-11-27 16:57:06 -05:00
<//>
2022-11-25 15:51:27 -05:00
`, ShadowDiv);