From ec30b659dfd337f5edf512ea78032fe18251b704 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Thu, 8 Oct 2026 13:52:25 +0200 Subject: refactor html module --- src/app/components/hello/root.zig | 6 +----- src/app/root.zig | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/app') diff --git a/src/app/components/hello/root.zig b/src/app/components/hello/root.zig index 55bf2e6..c4a7732 100644 --- a/src/app/components/hello/root.zig +++ b/src/app/components/hello/root.zig @@ -5,11 +5,7 @@ const Self = @This(); pub const component: z.Component = .{ .name = "hello", - .html = .native( - .div, - .{ .onclick = "@clicked" }, - .content("click me"), - ), + .html = .node("div", .{ .onclick = "@clicked" }, &.{.text("click me")}), .css = @embedFile("index.css"), .link = @This(), }; diff --git a/src/app/root.zig b/src/app/root.zig index eefc374..8ed7f43 100644 --- a/src/app/root.zig +++ b/src/app/root.zig @@ -16,7 +16,7 @@ pub const app: z.App(.{ .components = &.{ @import("components/hello/root.zig").component, }, - .body = .native(.@"app-hello", .{}, .content("")), + .body = .node("app-hello", .{}, &.{}), .theme = @embedFile("theme.css"), }) = .init; -- cgit v1.2.3-70-g09d2