David Vogel
e722ae1d2b
- Add and update example pages - Add example address component - Add vugu data tags to struct fields - Fix some button padding values - Remove debug log line - Fix background color of the sidebar menu
19 lines
397 B
Go
19 lines
397 B
Go
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})
|
|
}
|
|
}
|