@todys/react-pagination
v1.0.0
Published
This is a pagination component that can be used in react.
Downloads
5
Maintainers
Readme
@todys/react-pagination
This is a pagination component for react.
Installation
npm i @todys/react-pagination
Usage
import { Pagination } from '@todys/react-pagination'
const data = [Data]
const [post,setPost] = useState([]);
ReactDOM.render(
{
post...
}
<Pagination
defaultData={data}
setPost={setPost}
type="round"
line={5}
showNumber={10}
btnStartEnd={true}
/>
)
Props
| params | value | defaultValue | description | |--------|-------|--------------|-------------| |defaultData|array|-|post original data| |setPost|setState|-|setState containing the data to be displayed on the current page| |type|string|""|pagination style type| |line|number|5|number of lines to be displayed on the screen| |showNumber|number|10|page number to be displayed on the screen| |btnStartEnd|false|Boolean|Button to the first,last page|