24 lines
647 B
Go
24 lines
647 B
Go
package navigation
|
|
|
|
import "github.com/vugu/vugu"
|
|
|
|
type PaginateEvent struct {
|
|
vugu.DOMEvent
|
|
|
|
PaginationInfo // The current state of the pagination component.
|
|
}
|
|
|
|
// PaginationHandler is the interface for things that can handle PaginationEvent.
|
|
type PaginateHandler interface {
|
|
PaginateHandle(event PaginateEvent)
|
|
}
|
|
|
|
// PaginateFunc implements PaginateHandler as a function.
|
|
type PaginateFunc func(event PaginateEvent)
|
|
|
|
// PaginateHandle implements the PaginateHandler interface.
|
|
func (f PaginateFunc) PaginateHandle(event PaginateEvent) { f(event) }
|
|
|
|
// assert PaginateFunc implements PaginateHandler.
|
|
var _ PaginateHandler = PaginateFunc(nil)
|