mirror of
https://github.com/ziex-dev/ziex.git
synced 2026-07-22 11:39:34 -06:00
15 lines
395 B
Zig
15 lines
395 B
Zig
pub fn Page(allocator: zx.Allocator) zx.Component {
|
|
return (
|
|
<main @allocator={allocator}>
|
|
<Button title="Custom Button" />
|
|
</main>
|
|
);
|
|
}
|
|
|
|
const ButtonProps = struct { title: []const u8 };
|
|
pub fn Button(allocator: zx.Allocator, props: ButtonProps) zx.Component {
|
|
return (<button @allocator={allocator}>{props.title}</button>);
|
|
}
|
|
|
|
const zx = @import("zx");
|