This component is a simple React Pagination.
https://naoki85.github.io/react-simple-pagination-component/
$ npm i @naoki85/react-simple-pagination-component
# or
$ yarn add @naoki85/react-simple-pagination-component
This package also includes index.d.ts.
import React from 'react';
import { render } from 'react-dom';
import ReactSimplePaginationComponent from '@naoki85/react-simple-pagination-component';
const App: FC<{}> = () => {
return (
<ReactSimplePagination
page={1}
maxPage={5}
onClickAction={(page: number) => console.log(page)}
/>
);
}
Name | Type | Requirement | Description |
---|---|---|---|
page | number | ◯ | Current page number. |
maxPage | number | ◯ | Max number of pages. |
onClickAction | (number) => void | ◯ | Action when button is clicked. |
$ npm run build
$ npm run publishOnly
$ cd examples
$ npm run start
$ cd examples
$ npm run gh-publish