audiogram-beta/js/app.js

37 lines
1.0 KiB
JavaScript

import React from "react";
import {html} from "htm";
import * as TW from "./twind.js";
import * as UI from "./ui.js";
import * as Store from "./store.js";
// @ts-ignore:
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);
React.render(html`
<${Store.Provider}>
<div class="max-w-[1270px] mx-auto font-sans text-[16px] text-black">
<${UI.Header}/>
<div class="flex flex-col items-start lg:flex-row mt-4 mb-24">
<${UI.Controls}/>
<div class="flex-1 self-stretch">
<${UI.Chart}>
<${UI.Audiogram}/>
<//>
<div class="relative ml-10 mt-3 small-desktop:(ml-[100px] mr-[20px] -mt-[80px])">
<${UI.Display}/>
</div>
</div>
</div>
</div>
<//>
`, ShadowDiv);