aboutsummaryrefslogtreecommitdiff
path: root/src/app/components/navbutton/root.zig
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-10-12 09:43:19 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2026-10-12 09:43:19 +0200
commit0b2af471b6d5dfc4eaf53639102c1b854bbb324b (patch)
treeaba3943b8c54d26d8552d0685d4178bc995d91c3 /src/app/components/navbutton/root.zig
parent812f547d84b5ce1a2924ae16f6257e4fd19efcc0 (diff)
first version of zilch
Diffstat (limited to 'src/app/components/navbutton/root.zig')
-rw-r--r--src/app/components/navbutton/root.zig18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/app/components/navbutton/root.zig b/src/app/components/navbutton/root.zig
index b76af43..3505840 100644
--- a/src/app/components/navbutton/root.zig
+++ b/src/app/components/navbutton/root.zig
@@ -1,23 +1,23 @@
const std = @import("std");
-const zs = @import("zeroscript");
+const zilch = @import("zilch");
const Self = @This();
-pub const component: zs.Component = .{
+pub const component: zilch.Component = .{
.name = "navbutton",
.html = .parse(@embedFile("index.html")),
.css = @embedFile("index.css"),
.link = @This(),
};
-element: *zs.Object,
-shadow_root: *zs.Object,
+element: *zilch.Object,
+shadow_root: *zilch.Object,
button: struct {
- classList: *zs.Object,
+ classList: *zilch.Object,
},
-pub fn init(self: *Self, element: *zs.Object) !void {
- var env: zs.Env = .default;
+pub fn init(self: *Self, element: *zilch.Object) !void {
+ var env: zilch.Env = .default;
defer env.deinit();
self.element = element;
@@ -28,7 +28,7 @@ pub fn init(self: *Self, element: *zs.Object) !void {
}
pub fn deinit(self: *Self) !void {
- var env: zs.Env = .default;
+ var env: zilch.Env = .default;
defer env.deinit();
_ = self.element.free(&env);
@@ -37,7 +37,7 @@ pub fn deinit(self: *Self) !void {
}
pub fn open(self: *Self) !void {
- var env: zs.Env = .default;
+ var env: zilch.Env = .default;
defer env.deinit();
_ = self.button.classList.call(&env, "toggle", .{"open"});