mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
migration
This commit is contained in:
@@ -1,41 +1,31 @@
|
||||
import {
|
||||
Pagination,
|
||||
PaginationContent,
|
||||
PaginationItem,
|
||||
PaginationNext,
|
||||
PaginationPrevious
|
||||
} from "@/components/ui/pagination";
|
||||
import {PaginationIndexes} from "@/components/wrappers/common/pagination/pagination-indexes";
|
||||
import {cn} from "@/lib/utils";
|
||||
|
||||
import { Pagination, PaginationContent, PaginationItem, PaginationNext, PaginationPrevious } from "@/components/ui/pagination";
|
||||
import { PaginationIndexes } from "@/components/wrappers/common/pagination/pagination-indexes";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
export type paginationNavigationProps = {
|
||||
className?: string
|
||||
totalPages: number
|
||||
currentPage: number
|
||||
goToPage: (page: number) => void
|
||||
goToPrevPage: () => void
|
||||
goToNextPage: () => void
|
||||
maxVisiblePages?: number
|
||||
}
|
||||
|
||||
className?: string;
|
||||
totalPages: number;
|
||||
currentPage: number;
|
||||
goToPage: (page: number) => void;
|
||||
goToPrevPage: () => void;
|
||||
goToNextPage: () => void;
|
||||
maxVisiblePages?: number;
|
||||
};
|
||||
|
||||
export const PaginationNavigation = (props: paginationNavigationProps) => {
|
||||
|
||||
const {className, totalPages, currentPage, goToPage, goToPrevPage, goToNextPage, maxVisiblePages = 3} = props
|
||||
const { className, totalPages, currentPage, goToPage, goToPrevPage, goToNextPage, maxVisiblePages = 3 } = props;
|
||||
|
||||
return (
|
||||
<Pagination className={cn("", className)}>
|
||||
<PaginationContent>
|
||||
<PaginationItem>
|
||||
<PaginationPrevious onClick={goToPrevPage}/>
|
||||
<PaginationPrevious onClick={goToPrevPage} />
|
||||
</PaginationItem>
|
||||
<PaginationIndexes totalPages={totalPages} currentPage={currentPage} handlePageChange={goToPage}
|
||||
maxVisiblePages={maxVisiblePages}/>
|
||||
<PaginationIndexes totalPages={totalPages} currentPage={currentPage} handlePageChange={goToPage} maxVisiblePages={maxVisiblePages} />
|
||||
<PaginationItem>
|
||||
<PaginationNext onClick={goToNextPage}/>
|
||||
<PaginationNext onClick={goToNextPage} />
|
||||
</PaginationItem>
|
||||
</PaginationContent>
|
||||
</Pagination>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user