kodobe-react-pagination
v2.1.0
Published
kodobe react pagination
Downloads
3
Readme
Kodobe React Pagination
This is a simple react pagination package.
Install
npm install kodobe-react-pagination
or
yarn add kodobe-react-pagination
Setup
import Pagination from 'kodobe-react-pagination';
Usage
import Pagination from "kodobe-react-pagination";
function App() {
return (
<div>
<h3>Here is how to use a pagination</h3>
<Pagination
totalPage={100}
currentPage={1}
maxPageShown={5}
onChangePage={(p) => console.log(p)}
/>
</div>
);
}
Options
- currentPage : active page of type number (Required)
- totalPage : total count of elements, type is number (default=20)
- itemPerPage : item to show perpage, type is number (default=5)
- maxPageShown : maximum pagination counter, type is number
- onChangePage : function triggered with selected page (Required)
- className : string
- style : object