matrix-react-pagination
Description
- React pagination (simple) with css.
Usage
npm install matrix-react-pagination --save
Import the module in the place you want to use:
import Pagination, { PaginationNoTotal }
import 'matrix-react-pagination/build/styles.css' // => to main
Snippet
simple
const [page, setPage] = React.useState(1)
<Pagination
// className
totalCount={100}
// limit={10}
// labelFirst="|<<"
// labelLast="Last"
// sectionNumber={5} // display number of page
currentPage={page}
setCurrentPage={setPage}
// showFirstLast // ={true}
// showForwardBack // ={false}
/>
<Pagination
// className
totalCount={100}
// limit={10}
// labelFirst = "|<<",
// labelLast = ">>|",
// labelBack = "<",
// labelForward = ">",
currentPage={page}
setCurrentPage={setPage}
type="pager"
/>
<PaginationNoTotal
currentPage={page}
setCurrentPage={setPage}
currentRecordOnPage={10}
/>
props
npm install
npm run dev
npm run start
License
MIT