Last active
April 5, 2016 18:40
-
-
Save abhiaiyer91/b2f4793b550defd84f36 to your computer and use it in GitHub Desktop.
Pagination
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in client/components/pagination.jsx | |
import ReactPaginate from 'react-paginate'; | |
export default TodoPagination({handlePageClick, pageCount}) { | |
return ( | |
<div className="paginate"> | |
<ReactPaginate | |
previousLabel={"previous"} | |
nextLabel={"next"} | |
breakLabel={<li className="break"><a href="">...</a></li> | |
pageNum={pageCount} | |
marginPagesDisplayed={2} | |
pageRangeDisplayed={5} | |
clickCallback={handlePageClick} | |
containerClassName={"pagination"} | |
subContainerClassName={"pages pagination"} | |
activeClassName={"active"} | |
/> | |
</div> | |
) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment