react-nox-paginator
v1.0.1
Published
Made with create-react-library
Downloads
8
Readme
react-nox-paginator
Made with create-react-library
Install
npm install --save react-nox-paginator
Usage
import React, { Component } from 'react'
import MyComponent from 'react-nox-paginator'
import 'react-nox-paginator/dist/index.css'
class Example extends Component {
render() {
return <MyComponent />
}
}
totalPages, currentPage, rightArrow, leftArrow, handlePageChange, positionsAwayLeft, positionsAwayRight, color, buttonStyle, activeButtonStyle
Arguments
totalPages -> Number of total pages the paginator has
currentPage -> Current page where the user is
RightArrow and LeftArrow -> You can customize it ( giving a src to an <img/> tag)
HandlePageChange -> Function to increment the currentPage
positionsAwayLeft -> Positions to the left from the current one the user can see before appearing an ellipsis
positionsAwayRight -> Positions to the right from the current one the user can see before appearing an ellipsis
color -> Color for the arrows ( in case you use the default ones )
buttonStyle -> Style for all the buttons
activeButtonStyle -> Style for the currentPage button
## License
MIT © [NoxCoimbra](https://github.com/NoxCoimbra)