import { ItemsPerPageSelector } from './ItemsPerPageSelector'; import { PageSelector } from './PageSelector'; interface Props { onPageChange(page: number): void; onPageLimitChange(value: number): void; page: number; pageLimit: number; showAll?: boolean; totalCount: number; isPageInputVisible?: boolean; } export function PaginationControls({ pageLimit, page, onPageLimitChange, showAll, onPageChange, totalCount, isPageInputVisible, }: Props) { return (
{pageLimit !== 0 && ( )}
); function handlePageLimitChange(value: number) { onPageLimitChange(value); onPageChange(1); } }