D3vugu-components/components/input/dropdown_vgen.go
David Vogel 852fd54082 Remove margin from input elements
- Remove margin from button
- Remove margin from dropdown
- Remove margin from input field
- Remove margin from sidebar entry
- Remove unnecessary margin: 0 definitions
- Fix sidebar due to removed button margin
- Replace modal requester paragraph with span
- Replace simple toast paragraph with span
2023-05-27 23:48:57 +02:00

64 lines
2.1 KiB
Go

package input
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
import "fmt"
import "reflect"
import "github.com/vugu/vjson"
import "github.com/vugu/vugu"
import js "github.com/vugu/vugu/js"
import (
//"git.d3nexus.de/Dadido3/D3vugu-components/icons"
"git.d3nexus.de/Dadido3/D3vugu-components/utils"
)
func (c *Dropdown) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{}
var vgiterkey interface{}
_ = vgiterkey
var vgn *vugu.VGNode
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "select", Attr: []vugu.VGAttribute(nil)}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrInterface("value", c.currentKey())
vgn.AddAttrList(utils.AttributesAppend{AttrMap: c.AttrMap, Classes: "d3c-1685186383"})
vgn.DOMEventHandlerSpecList = append(vgn.DOMEventHandlerSpecList, vugu.DOMEventHandlerSpec{
EventType: "change",
Func: func(event vugu.DOMEvent) { c.handleChange(event) },
// TODO: implement capture, etc. mostly need to decide syntax
})
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
for vgiterkeyt, entry := range c.keyValuePairs() {
var vgiterkey interface{} = vgiterkeyt
_ = vgiterkey
entry := entry
_ = entry
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "option", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
vgn.AddAttrInterface("selected", c.isKeySelected(entry.Key))
vgn.AddAttrInterface("value", entry.Key)
vgn.SetInnerHTML(entry.Value)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Data: "style", Attr: []vugu.VGAttribute(nil)}
{
vgn.AppendChild(&vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t.d3c-1685186383 {\n\t\tpadding: 0.25em 0.5em;\n\t\t/*margin: 0.5em 0;*/\n\t}\n", Attr: []vugu.VGAttribute(nil)})
}
vgout.AppendCSS(vgn)
return vgout
}
// 'fix' unused imports
var _ fmt.Stringer
var _ reflect.Type
var _ vjson.RawMessage
var _ js.Value