aboutsummaryrefslogtreecommitdiff
path: root/src/z/Component.zig
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-10-05 15:33:46 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2026-10-05 15:33:46 +0200
commit02582cc490fc0d753dd153211cc172eb28fbee5d (patch)
tree4add149d5e1ecf28cf20ecb497626fef85cdbd75 /src/z/Component.zig
parent2f3199622d9e7a97da4b5c31a2d81b170b7cdaa6 (diff)
first sketch of wasm environment
Diffstat (limited to 'src/z/Component.zig')
-rw-r--r--src/z/Component.zig18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/z/Component.zig b/src/z/Component.zig
deleted file mode 100644
index a6a4923..0000000
--- a/src/z/Component.zig
+++ /dev/null
@@ -1,18 +0,0 @@
-const std = @import("std");
-const html = @import("html");
-const z = @import("root.zig");
-
-name: @EnumLiteral(),
-body: []const u8,
-style: []const u8,
-script: []const u8,
-
-pub fn toElement(comptime self: @This()) html.Element {
- return .transparent(.children(&.{
- .native(.template, .{ .id = "@" ++ @tagName(self.name) }, .children(&.{
- z.style.load(self.style),
- z.body.load(self.body),
- })),
- z.script.load("Zenv.constructors['component__" ++ @tagName(self.name) ++ "'] = async (Z) => {" ++ self.script ++ "}"),
- }));
-}