1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 17:45:10 +01:00
onion/js/components/ascribe_pagination/pagination.js

36 lines
1.1 KiB
JavaScript
Raw Normal View History

import React from 'react';
2015-05-22 12:58:06 +02:00
import PaginationButton from './pagination_button';
let Pagination = React.createClass({
2015-05-22 12:58:06 +02:00
propTypes: {
goToPage: React.PropTypes.func.isRequired,
2015-05-22 17:11:17 +02:00
currentPage: React.PropTypes.number.isRequired,
totalPages: React.PropTypes.number.isRequired
//itemListCount: React.PropTypes.number.isRequired
},
render() {
return(
<nav>
<ul className="pager">
2015-05-22 12:58:06 +02:00
<PaginationButton
direction='previous'
goToPage={this.props.goToPage}
2015-05-22 17:11:17 +02:00
currentPage={this.props.currentPage}
totalPages={this.props.totalPages}>
2015-05-22 12:58:06 +02:00
</PaginationButton>
<PaginationButton
direction='next'
goToPage={this.props.goToPage}
2015-05-22 17:11:17 +02:00
currentPage={this.props.currentPage}
totalPages={this.props.totalPages}>
2015-05-22 12:58:06 +02:00
</PaginationButton>
</ul>
</nav>
);
}
});
export default Pagination;