@@ -68,20 +68,21 @@ function DataTable({ data, columns, title, loading, className }: TableData) {
68
68
69
69
return (
70
70
< div
71
- className = { `relative font-serif bg-indigo-100 dark:bg-dark-bg shadow-lg h-fit px-5 py-8 rounded-md w-[100%] overflow-scroll "lg:ml-60 mx-auto"} mb-10 ${ className } ` }
71
+ className = { `relative font-serif bg-indigo-100 dark:bg-dark-bg shadow-lg h-fit px-5 py-8 rounded-md w-[100%] overflow-auto "lg:ml-60 mx-auto"} mb-10 ${ className } ` }
72
72
>
73
73
< div className = "flex flex-col md:flex-row items-center justify-between pb-6 space-y-4 md:space-y-0" >
74
74
< div >
75
75
< h2 className = "text-lg md:text-xl font-semibold text-gray-800 dark:text-white" >
76
76
{ t ( title ) }
77
77
</ h2 >
78
- < input
78
+ { /* Uncomment if you want a filter input */ }
79
+ { /* <input
79
80
value={filterInput}
80
81
aria-label="Filter table data"
81
82
placeholder="Filter"
82
83
className="px-4 py-2 mt-4 font-sans text-xs md:text-sm border rounded outline-none border-primary dark:bg-neutral-600 dark:text-white w-full sm:w-52 md:w-96"
83
84
onChange={handleFilterChange}
84
- />
85
+ /> */ }
85
86
</ div >
86
87
</ div >
87
88
< div className = "overflow-x-auto" >
@@ -94,7 +95,9 @@ function DataTable({ data, columns, title, loading, className }: TableData) {
94
95
< tr { ...headerGroup . getHeaderGroupProps ( ) } key = { headerGroup . id } >
95
96
{ headerGroup . headers . map ( ( column ) => (
96
97
< th
97
- className = { `thead ${ column . isSorted ? 'sort-asc' : '' } ` }
98
+ className = { `thead w-1/${ columns . length } text-center ${
99
+ column . isSorted ? 'sort-asc' : ''
100
+ } `}
98
101
{ ...column . getHeaderProps ( column . getSortByToggleProps ( ) ) }
99
102
key = { column . id }
100
103
>
@@ -113,15 +116,15 @@ function DataTable({ data, columns, title, loading, className }: TableData) {
113
116
< tr
114
117
className = { `border-b dark:border-gray-700 ${
115
118
row . index % 2 === 0
116
- ? 'bg-light-bg dark:bg-neutral-600'
117
- : 'bg-white dark:bg-dark-bg '
119
+ ? 'bg-gray-600 dark:bg-neutral-600'
120
+ : 'bg-transparent '
118
121
} `}
119
122
{ ...row . getRowProps ( ) }
120
123
key = { row . id }
121
124
>
122
125
{ row . cells . map ( ( cell ) => (
123
126
< td
124
- className = " data-cell px-4 py-2"
127
+ className = { `w-1/ ${ columns . length } data-cell px-4 py-2 text-center` }
125
128
{ ...cell . getCellProps ( ) }
126
129
key = { cell . column . id }
127
130
>
0 commit comments