2023-05-08 18:43:07 +00:00
|
|
|
package input
|
|
|
|
|
|
|
|
import "github.com/vugu/vugu"
|
|
|
|
|
|
|
|
type Button struct {
|
|
|
|
AttrMap vugu.AttrMap
|
|
|
|
|
2023-05-16 16:10:24 +00:00
|
|
|
SymbolSlot vugu.Builder `vugu:"data"` // Slot for the symbol.
|
|
|
|
DefaultSlot vugu.Builder `vugu:"data"`
|
2023-05-12 10:57:42 +00:00
|
|
|
|
|
|
|
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
|
|
|
}
|