import React from 'react'; import Router from 'react-router'; let Link = Router.Link; let PaginationButton = React.createClass({ propTypes: { direction: React.PropTypes.oneOf(['previous', 'next']), goToPage: React.PropTypes.func.isRequired, currentPage: React.PropTypes.number.isRequired }, render() { let page = parseInt(this.props.currentPage, 10); let directionDisplay; let isDisabled = ''; if(this.props.direction === 'previous') { page -= 1; directionDisplay = ( ); } else { page += 1; directionDisplay = ( Previous Next ); } if(page === 0) { isDisabled += ' disabled'; } return (