File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,12 @@ const usePagination = (
33 numPages : number ,
44 //eslint-disable-next-line @typescript-eslint/ban-types
55 callback : Function ,
6- closeOnLastPage ?: ( ) => void ,
6+ onCloseOnLastPage ?: ( ) => void ,
77 numNeighbors = 2
88) => {
99 const incrementPage = ( ) => {
10- if ( currentPage === numPages && closeOnLastPage ) {
11- closeOnLastPage ( ) ;
10+ if ( currentPage === numPages && onCloseOnLastPage ) {
11+ onCloseOnLastPage ( ) ;
1212 } else {
1313 const newPage = Math . min ( numPages , currentPage + 1 ) ;
1414 callback ( newPage ) ;
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ interface CompactPaginationProps {
7777 numPages : number ;
7878 //eslint-disable-next-line @typescript-eslint/ban-types
7979 callback : Function ;
80- closeOnLastPage ?: ( ) => void ;
80+ onCloseOnLastPage ?: ( ) => void ;
8181 label ?: ReactNode ;
8282 className ?: string ;
8383}
@@ -86,21 +86,21 @@ const CompactPagination: React.FC<CompactPaginationProps> = ({
8686 currentPage,
8787 numPages,
8888 callback,
89- closeOnLastPage ,
89+ onCloseOnLastPage ,
9090 label,
9191 className,
9292} ) => {
9393 const [ { incrementPage, decrementPage, minPageReached, maxPageReached } ] =
94- usePagination ( currentPage , numPages , callback , closeOnLastPage ) ;
94+ usePagination ( currentPage , numPages , callback , onCloseOnLastPage ) ;
9595
9696 return (
9797 < Wrapper { ...{ className } } >
9898 < StyledLabel > { label } </ StyledLabel >
9999 < LeftArrow disabled = { minPageReached } onClick = { decrementPage } >
100100 < Arrow className = { StyledSVG . styledComponentId } />
101101 </ LeftArrow >
102- { currentPage === numPages && closeOnLastPage ? (
103- < CloseButton onClick = { closeOnLastPage } >
102+ { currentPage === numPages && onCloseOnLastPage ? (
103+ < CloseButton onClick = { onCloseOnLastPage } >
104104 < SolidErrorIcon className = { StyledSVG . styledComponentId } />
105105 </ CloseButton >
106106 ) : (
You can’t perform that action at this time.
0 commit comments