UNPKG

violet-paginator

Version:

Display, paginate, sort, filter, and update items from the server. violet-paginator is a complete list management library for react/redux applications.

20 lines (16 loc) 460 B
import React, { PropTypes } from 'react' import { flip } from './decorators' export function Prev({ pageActions, hasPreviousPage }) { return ( <button type="button" disabled={!hasPreviousPage} onClick={pageActions.prev}> <i className="fa fa-chevron-left" /> </button> ) } Prev.propTypes = { pageActions: PropTypes.shape({ prev: PropTypes.func.isRequired }).isRequired, hasPreviousPage: PropTypes.bool } export default flip(Prev)