diff options
Diffstat (limited to 'src/app/components/icons/root.zig')
| -rw-r--r-- | src/app/components/icons/root.zig | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/app/components/icons/root.zig b/src/app/components/icons/root.zig new file mode 100644 index 0000000..a2b0fa6 --- /dev/null +++ b/src/app/components/icons/root.zig @@ -0,0 +1,21 @@ +const z = @import("z"); + +pub const icons: []const z.Component = &.{ + icon("menu"), + icon("upload"), + icon("settings"), +}; + +const Icon = struct { + pub fn init(_: *@This(), _: *z.Object) void {} +}; + +pub fn icon(name: []const u8) z.Component { + return .{ + .namespace = "icon", + .name = name, + .html = .parse(@embedFile(name ++ ".svg")), + .css = @embedFile("index.css"), + .link = Icon, + }; +} |