@belong-ui/pagination
v0.1.29
Published
belong-ui: Pagination Component
Downloads
37
Readme
Pagination Usage:
const [PAGE_RANGE_DISPLAYED, PAGE_SIZE, totalResults] = [5, 15, 1000];
initialState = {
activePage: 1,
};
<Pagination
pageRangeDisplayed={PAGE_RANGE_DISPLAYED}
activePage={state.activePage}
itemsCountPerPage={PAGE_SIZE}
totalItemsCount={totalResults}
renderPrevPage={() => (<i className="fa fa-chevron-left"></i>)}
renderNextPage={() => (<i className="fa fa-chevron-right"></i>)}
onChange={(pageNumber) => {
setState({ activePage: pageNumber });
}}
/>