UIPagination

Properties

Name Type
props props

new UIPagination(props)

Pagination UI Package

Param Type
props props

Example

import {UIPagination} from 'writer'

render($$) {
    const el = $$('div')
    return el.append(
        $$(UIPagination, {
            currentPage: 1,
            totalPages: 10,
            onPageChange: (pageNumber) => {
                console.info(`You are now on page ${pageNumber}`)
            }
        })
    )
}

UIPagination.props

Properties

Name Type Description
currentPage int Current page number, not zero-indexed
totalPages int Number of total pages
onPageChange function Callback function fires when current page is changed

results matching ""

    No results matching ""