1
-
2
1
import React from 'react' ;
3
2
4
3
interface SkeletonTableProps {
@@ -11,18 +10,30 @@ function SkeletonTable({ columns }: SkeletonTableProps) {
11
10
< thead >
12
11
< tr >
13
12
{ columns . map ( ( column : any , index : React . Key | null | undefined ) => (
14
- < th key = { column . id || column . name } className = "px-6 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider" >
15
- < div className = "h-4 bg-gray-300 rounded w-3/4" aria-label = "Loading skeleton" />
13
+ < th
14
+ key = { column . id || column . name }
15
+ className = "px-6 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider dark:bg-[#0A1729] dark:text-gray-400"
16
+ >
17
+ < div
18
+ className = "h-4 bg-gray-300 rounded w-3/4 dark:bg-gray-700"
19
+ aria-label = "Loading skeleton"
20
+ />
16
21
</ th >
17
22
) ) }
18
23
</ tr >
19
24
</ thead >
20
25
< tbody >
21
- { [ ...Array ( 5 ) ] . map ( ( _ , rowIndex :any ) => (
26
+ { [ ...Array ( 5 ) ] . map ( ( _ , rowIndex : any ) => (
22
27
< tr key = { rowIndex . id || rowIndex . name } >
23
- { columns . map ( ( _ , colIndex :any ) => (
24
- < td key = { colIndex . id || colIndex . name } className = "px-6 py-4 border-b border-gray-200 bg-white text-sm" >
25
- < div className = "h-4 bg-gray-300 rounded w-full" aria-label = "Loading skeleton" />
28
+ { columns . map ( ( _ , colIndex : any ) => (
29
+ < td
30
+ key = { colIndex . id || colIndex . name }
31
+ className = "px-6 py-4 border-b border-gray-200 bg-white text-sm dark:bg-[#0A1731] dark:border-gray-400"
32
+ >
33
+ < div
34
+ className = "h-4 bg-gray-300 rounded w-full dark:bg-gray-700"
35
+ aria-label = "Loading skeleton"
36
+ />
26
37
</ td >
27
38
) ) }
28
39
</ tr >
@@ -32,4 +43,4 @@ function SkeletonTable({ columns }: SkeletonTableProps) {
32
43
) ;
33
44
}
34
45
35
- export default SkeletonTable ;
46
+ export default SkeletonTable ;
0 commit comments