com.nugo.web.component.pagination
v1.1.2
Published
Nugo default pagination component
Downloads
3
Readme
Nugo Pagination
This repository contains the nugo-pagination package.
Instalation
Using yarn:
$ yarn add nugo-pagination
Using npm:
$ npm i nugo-pagination
Usage
// Import
import Pagination from 'nugo-pagination'
// Using
<Pagination
totalRecords={[Number] Total number of records}
pageSize={[Number] The number of records per page}
pageNeighbours={[Number] Quantity of pages to be put left and right on the center number}
onPageChange={[Func] Func to receive the pagination click callback}
/>
//Example
<Pagination
totalRecords={50}
pageSize={10}
pageNeighbours={1}
onPageChange={paginationChangeHandler}
/>
Publishing (Development)
Follow these steps to publish the package:
- Make the code changes;
- Change the version package in package.json (https://semver.org/);
- run the follow command:
npm publish
Available Scripts (Development)
In the project directory, you can run:
yarn clean
Remove all files from dist folder.
yarn build
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
See the section about deployment for more information.