diff options
Diffstat (limited to 'src/app/components')
| -rw-r--r-- | src/app/components/hello/index.css | 0 | ||||
| -rw-r--r-- | src/app/components/hello/index.html | 0 | ||||
| -rw-r--r-- | src/app/components/hello/root.zig | 17 |
3 files changed, 17 insertions, 0 deletions
diff --git a/src/app/components/hello/index.css b/src/app/components/hello/index.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/components/hello/index.css diff --git a/src/app/components/hello/index.html b/src/app/components/hello/index.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/components/hello/index.html diff --git a/src/app/components/hello/root.zig b/src/app/components/hello/root.zig new file mode 100644 index 0000000..6f68550 --- /dev/null +++ b/src/app/components/hello/root.zig @@ -0,0 +1,17 @@ +const std = @import("std"); +const z = @import("z"); + +pub const component: z.Component = .{ + .name = "hello", + .html = .native( + .div, + .{ .onclick = "@clicked" }, + .content("click me"), + ), + .css = @embedFile("index.css"), + .link = @This(), +}; + +pub fn clicked() void { + z.log.js.debug("hi"); +} |