D3vugu-components/components/input/button.go

19 lines
397 B
Go
Raw Normal View History

2023-05-08 18:43:07 +00:00
package input
import "github.com/vugu/vugu"
type Button struct {
AttrMap vugu.AttrMap
SymbolSlot vugu.Builder `vugu:"data"` // Slot for the symbol.
DefaultSlot vugu.Builder `vugu:"data"`
Click ClickHandler // External handler that is called upon an event.
}
func (c *Button) HandleClick(event vugu.DOMEvent) {
if c.Click != nil {
c.Click.ClickHandle(ClickEvent{DOMEvent: event})
}
2023-05-08 18:43:07 +00:00
}