import React from 'react'; import _ from 'lodash'; const Paginator = (props) => { let {totalRecords=0, currentPage=1, pageSize=15} = props; let pages = [1]; let previousItemStyle = totalRecordspageSize){ pages = _.times(parseInt(totalRecords/pageSize,10)); } const onPrevious = ()=>{ if(props.previousPage){ props.previousPage(); } } const onNext = ()=>{ if(props.nextPage){ props.nextPage(); } } const onPageClick = (pageNum)=>{ if(props.goToNextPage){ props.goToNextPage(pageNum); } } return ( ) } export default Paginator;