interface DataTablePaginationProps { rowCountLabel?: string; displayedCount?: number; total?: number; children?: React.ReactNode; } export function DataTablePagination({ displayedCount = undefined, total = undefined, rowCountLabel = 'row(s) total', children, }: DataTablePaginationProps) { return (
{displayedCount && total && (
{Math.min(total, displayedCount)} of {total} {rowCountLabel}
)} {displayedCount && total === undefined && (
{displayedCount} {rowCountLabel}
)} {children}
); }