D3vugu-components/components/navigation/events.go
David Vogel e722ae1d2b Add pagination component
- 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
2023-05-16 18:10:24 +02:00

24 lines
625 B
Go

package navigation
import "github.com/vugu/vugu"
type PaginationEvent struct {
vugu.DOMEvent
Page int
}
// PaginationHandler is the interface for things that can handle PaginationEvent.
type PaginationHandler interface {
PaginationHandle(event PaginationEvent)
}
// PaginationFunc implements PaginationHandler as a function.
type PaginationFunc func(event PaginationEvent)
// PaginationHandle implements the PaginationHandler interface.
func (f PaginationFunc) PaginationHandle(event PaginationEvent) { f(event) }
// assert PaginationFunc implements PaginationHandler.
var _ PaginationHandler = PaginationFunc(nil)