import { ChevronLeftIcon, ChevronRightIcon, DoubleArrowLeftIcon, DoubleArrowRightIcon, } from '@radix-ui/react-icons'; import { Button } from '@shadcn/ui/button'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@shadcn/ui/select'; import { Table } from '@tanstack/react-table'; interface PaginationText { textRowsPerPage?: string; textPageOf?: (pageIndex: number, pageCount: number) => string; } interface PaginationProps { table: Table; text?: PaginationText; } export function Pagination({ table, text }: PaginationProps) { return (
{text?.textPageOf?.(table.getState().pagination.pageIndex + 1, table.getPageCount()) || `Page ${table.getState().pagination.pageIndex + 1} of ${table.getPageCount()}`}

{text?.textRowsPerPage || 'Rows per page'}

); }