aboutsummaryrefslogtreecommitdiff
path: root/src/app/components/icons/root.zig
blob: a2b0fa6d768f8b136d2c2407dea8493e30c6315f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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,
    };
}