Skip to content

Instantly share code, notes, and snippets.

@abhiaiyer91
Last active April 5, 2016 18:40
Show Gist options
  • Save abhiaiyer91/b2f4793b550defd84f36 to your computer and use it in GitHub Desktop.
Save abhiaiyer91/b2f4793b550defd84f36 to your computer and use it in GitHub Desktop.
Pagination
// 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