Skip to content

Commit b39ca0f

Browse files
committed
colors
1 parent 670f7bc commit b39ca0f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

colors/colors.htm

+17
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>Colors</title>
7+
<script>
8+
function write(selector, text) {
9+
const e = document.querySelector(selector);
10+
if (typeof text === "object") {
11+
for (const [k, v] of Object.entries(text)) {
12+
e[k] = v;
13+
}
14+
} else {
15+
e.innerText = text;
16+
}
17+
}
18+
</script>
19+
<script type="module">
20+
import colors from "./colors.js";
21+
const primary = colors[0];
22+
console.log(colors);
23+
</script>
724
</head>
825
<body>
926

0 commit comments

Comments
 (0)