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
24 lines
625 B
Go
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)
|