11import React , { Component } from 'react' ;
2- import { createUltimatePagination , ITEM_TYPES } from 'react-ultimate-pagination' ;
2+ import { createUltimatePagination , ITEM_TYPES } from 'react-ultimate-pagination' ;
33import { Input , Label } from 'reactstrap' ;
44
5- const WrapperComponent = ( { children} ) => (
5+ const WrapperComponent = ( { children } ) => (
66 < ul className = "pagination" > { children } </ ul >
77) ;
88
9- const withPreventDefault = ( fn ) => ( event ) => {
9+ const withPreventDefault = fn => ( event ) => {
1010 event . preventDefault ( ) ;
1111 fn ( ) ;
1212} ;
1313
14- const Page = ( { value, isActive, onClick} ) => (
14+ const Page = ( { value, isActive, onClick } ) => (
1515 < li className = { isActive ? 'page-item active' : 'page-item' } >
1616 < a className = "page-link" href = "#" onClick = { withPreventDefault ( onClick ) } > { value } </ a >
1717 </ li >
1818) ;
1919
20- const createPageLink = children => ( { onClick} ) => (
20+ const createPageLink = children => ( { onClick } ) => (
2121 < li className = "page-item" >
2222 < a className = "page-link" href = "#" onClick = { withPreventDefault ( onClick ) } > { children } </ a >
2323 </ li >
@@ -32,7 +32,10 @@ const itemTypeToComponent = {
3232 [ ITEM_TYPES . LAST_PAGE_LINK ] : createPageLink ( < span > »</ span > ) ,
3333} ;
3434
35- const UltimatePaginationBootstrap4 = createUltimatePagination ( { itemTypeToComponent, WrapperComponent} ) ;
35+ const UltimatePaginationBootstrap4 = createUltimatePagination ( {
36+ itemTypeToComponent,
37+ WrapperComponent,
38+ } ) ;
3639
3740export default ( props ) => {
3841 const { resourceList, onPageSize, onPageNumber } = props ;
@@ -47,7 +50,7 @@ export default (props) => {
4750 }
4851
4952 return (
50- < div className = "d-flex justify-content-center" style = { { height : '50px' } } >
53+ < div className = "d-flex justify-content-center" style = { { height : '50px' } } >
5154 < UltimatePaginationBootstrap4
5255 currentPage = { currentPage }
5356 totalPages = { totalPages }
@@ -56,13 +59,13 @@ export default (props) => {
5659 < Label
5760 for = "perPage"
5861 className = "align-self-center"
59- style = { { marginLeft : '20px' , padding : '8px' } } > Per Page</ Label >
60- < Input type = "select" name = "perPage" value = { size } onChange = { onPageSize } style = { { width : '60px' } } >
62+ style = { { marginLeft : '20px' , padding : '8px' } } > Per Page</ Label >
63+ < Input type = "select" name = "perPage" value = { size } onChange = { onPageSize } style = { { width : '60px' } } >
6164 < option value = "10" > 10</ option >
6265 < option value = "20" > 20</ option >
6366 < option value = "50" > 50</ option >
6467 < option value = "100" > 100</ option >
6568 </ Input >
6669 </ div >
6770 ) ;
68- }
71+ } ;
0 commit comments