-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
64 lines (59 loc) · 1.49 KB
/
index.html
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<style>
@import "https://unpkg.com/open-props";
@import "https://unpkg.com/open-props/normalize.min.css";
@use postcss-preset-env;
#root {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
gap: 1ch;
}
ul {
list-style: none!important;
padding-inline-start: 0;
}
li {
margin-bottom: 2px;
}
label {
display: flex;
align-items: center;
gap: 1ch;
}
del,ins {
flex-grow: 1;
padding: 2px;
}
form {
display: flex;
gap: 1ch;
align-items: center;
margin-top: 2ch;
}
</style>
<div id="root"></div>
<script type="module">
import "https://unpkg.com/react/umd/react.production.min.js";
import "https://unpkg.com/react-dom/umd/react-dom.production.min.js";
import init, { WasmReact, App } from "./pkg/todo.js";
async function main() {
await init();
WasmReact.useReact(React);
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(React.createElement(App));
}
main();
</script>
</body>
</html>