ziex/test/data/component/import.zig
Nurul Huda (Apon) 33ec71739d
refactor(ast): use direct import of zx
- This is to allow importing zx with any other decl name than zx
2026-02-09 11:14:05 +06:00

22 lines
515 B
Zig

pub fn Page(allocator: z.Allocator) z.Component {
var _zx = @import("zx").allocInit(allocator);
return _zx.ele(
.main,
.{
.allocator = allocator,
.children = &.{
_zx.cmp(
Button,
.{},
.{ .title = "Custom Button" },
),
},
},
);
}
const z = @import("zx");
const Button = @import("basic.zig").Button;
// const ClientComponent = @jsImport("basic.tsx");