aboutsummaryrefslogtreecommitdiff
path: root/src/app/components/icons/root.zig
blob: 298cfa67c3a5444f1760e1a15b6fc949feb6bc46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const zs = @import("zeroscript");

pub const icons: []const zs.Component = &.{
    icon("menu"),
    icon("upload"),
    icon("settings"),
};

const Icon = struct {
    pub fn init(_: *@This(), _: *zs.Object) void {}
};

pub fn icon(name: []const u8) zs.Component {
    return .{
        .namespace = "icon",
        .name = name,
        .html = .parse(@embedFile(name ++ ".svg")),
        .css = @embedFile("index.css"),
        .link = Icon,
    };
}