1
+ import { useState } from 'react' ;
1
2
import {
2
3
ColumnDef ,
3
4
ColumnFiltersState ,
@@ -32,7 +33,6 @@ import {
32
33
SelectTrigger ,
33
34
SelectValue ,
34
35
} from '@/components/ui/select' ;
35
- import { useState } from 'react' ;
36
36
37
37
interface QuestionTableProps < TData , TValue > {
38
38
columns : ColumnDef < TData , TValue > [ ] ;
@@ -73,7 +73,7 @@ export function QuestionTable<TData, TValue>({
73
73
} ;
74
74
75
75
return (
76
- < div >
76
+ < div className = 'flex size-full flex-col' >
77
77
< div className = 'flex items-center py-4' >
78
78
< div className = 'mr-2' >
79
79
< Select onValueChange = { handleStatusFilterChange } >
@@ -107,11 +107,14 @@ export function QuestionTable<TData, TValue>({
107
107
className = 'max-w-sm'
108
108
/>
109
109
</ div >
110
- < div className = 'rounded-md border' >
110
+ < div className = 'border-border rounded-md border' >
111
111
< Table >
112
112
< TableHeader >
113
113
{ table . getHeaderGroups ( ) . map ( ( headerGroup ) => (
114
- < TableRow key = { headerGroup . id } >
114
+ < TableRow
115
+ className = 'border-border/60 bg-primary-foreground text-primary'
116
+ key = { headerGroup . id }
117
+ >
115
118
{ headerGroup . headers . map ( ( header ) => {
116
119
return (
117
120
< TableHead key = { header . id } >
@@ -127,7 +130,7 @@ export function QuestionTable<TData, TValue>({
127
130
< TableBody >
128
131
{ ! isError && table . getRowModel ( ) . rows ?. length ? (
129
132
table . getRowModel ( ) . rows . map ( ( row ) => (
130
- < TableRow key = { row . id } >
133
+ < TableRow key = { row . id } className = 'border-border/60 even:bg-secondary/10' >
131
134
{ row . getVisibleCells ( ) . map ( ( cell ) => (
132
135
< TableCell key = { cell . id } >
133
136
{ flexRender ( cell . column . columnDef . cell , cell . getContext ( ) ) }
0 commit comments