initial port of the UI kit
This commit is contained in:
@@ -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 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user