aboutsummaryrefslogtreecommitdiff
path: root/src/app/components/image/root.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/components/image/root.zig')
-rw-r--r--src/app/components/image/root.zig14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/app/components/image/root.zig b/src/app/components/image/root.zig
index 971713d..c9aeef4 100644
--- a/src/app/components/image/root.zig
+++ b/src/app/components/image/root.zig
@@ -1,8 +1,18 @@
const zilch = @import("zilch");
-pub const component: zilch.Component = .{
+pub const component: zilch.Component = .build(.{
.name = "image",
.html = .parse(@embedFile("index.html")),
.css = @embedFile("index.css"),
.link = @This(),
-};
+});
+
+const Self = @This();
+
+element: *zilch.Object,
+
+pub fn init(self: *Self, element: *zilch.Object) !void {
+ self.element = element;
+}
+
+pub const connect = component.connect;