Pagination
we provide:
- the
total
number of pages - the
value
of the cursor aka selected page number. - the
onChange
handler - (optional)
withControls
, to show previous and next arrows, defaults to true. - (optional)
withEdges
, to show first and last arrows, default to false. - (optional)
size
, to get bigger or smaller pagination control, defaults to md - (optional)
radius
, to get rounder or squarer controls, defaults to md
const [activePage, setActivePage] = useState<number>(1)
<Pagination total={10} value={activePage} onChange={setActivePage} />