initial port of the UI kit

This commit is contained in:
2026-07-13 01:58:29 -04:00
parent 261a7f2b4d
commit b02df48a66
51 changed files with 7507 additions and 154 deletions

View File

@@ -49,7 +49,11 @@ func El(tag string, mods ...Mod) *VNode {
// Text builds a text VNode.
func Text(s string) *VNode { return &VNode{Text: s} }
func (n *VNode) apply(parent *VNode) { parent.Children = append(parent.Children, n) }
func (n *VNode) apply(parent *VNode) {
if n != nil { // a nil child renders nothing (e.g. a closed Modal/Menu returns nil)
parent.Children = append(parent.Children, n)
}
}
type attrMod struct{ k, v string }