workroom-pagination
v0.1.7
Published
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
Readme
workroom-pagination
The workroom-pagination library is provided to simplify the bootstrap process.
Installation
Using npm:
$ npm i -g workroom-pagination
$ npm i --save workroom-paginationUsage
import React from 'react';
import WorkroomPagination from "workroom-pagination";
export default function MyComponent() {
return (
<>
<WorkroomPagination currentPage={currentPage} totalPages={Math.ceil(totalCount / PAGE_SIZE)} onPageChange={handlePageChange} />
</>
);
};
export default MyComponent;Props
| Prop | Type | Description | | ------------- |:-------------:| -----:| | currentPage | Int | The current page number | | totalPages | Int | Total number of pages to be displayed. | | onPageChange | function | The call back function which should be triggered when the user changes the page from pagination. |
