Created
November 20, 2019 06:02
-
-
Save TimeSmash/f63ce42903828e668740b039a19e48c4 to your computer and use it in GitHub Desktop.
Composing our ReactPaginate component and organizing its parts in a logistical way
This file contains 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
<ReactPaginate id="react-paginate" | |
// labels | |
previousLabel={'Previous'} | |
nextLabel={'Next'} | |
breakLabel={'…'} | |
// classNames | |
containerClassName={'react-paginate'} | |
previousClassName={'previous'} | |
breakClassName={'break-me'} | |
nextClassName={'next'} | |
pageClassName={'page'} | |
activeClassName={'active'} | |
pageLinkClassName={'page-link'} | |
disabledClassName={'disabled'} | |
// functionality | |
pageCount={this.state.drinkAndPageInfo.page_count} //total pages | |
marginPagesDisplayed={2} | |
pageRangeDisplayed={5} | |
forcePage={5} | |
onPageChange={(event) => {this.handlePageClick(event)} /*Fxn when page clicked*/} | |
disableInitialCallback={true} | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment