Skip to content

Commit

Permalink
feat: add styles for pagination buttons (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregkonush authored Dec 1, 2024
1 parent 6471fc9 commit c581c05
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions services/ecran/src/app/problems/data-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@
import { Button } from '@/components/ui/button'
import { useRouter, usePathname } from 'next/navigation'
import { ChevronLeft, ChevronRight } from 'lucide-react'
import { cn } from '@/lib/utils'

interface DataTableProps<TData, TValue> {
columns: ColumnDef<TData, TValue>[]
Expand Down Expand Up @@ -94,6 +95,7 @@ export function DataTable<TData, TValue>({ columns, data, pageCount, pageSize, p
size="sm"
onClick={() => handlePageChange(currentPage - 1)}
disabled={currentPage === 1}
className={cn(currentPage === 1 && 'bg-zinc-100 dark:bg-zinc-800')}
>
<ChevronLeft />
</Button>
Expand All @@ -102,6 +104,7 @@ export function DataTable<TData, TValue>({ columns, data, pageCount, pageSize, p
size="sm"
onClick={() => handlePageChange(currentPage + 1)}
disabled={currentPage === pageCount}
className={cn(currentPage === pageCount && 'bg-zinc-100 dark:bg-zinc-800')}
>
<ChevronRight />
</Button>
Expand Down

0 comments on commit c581c05

Please sign in to comment.