1-
21import React from 'react' ;
32
43interface SkeletonTableProps {
@@ -11,18 +10,30 @@ function SkeletonTable({ columns }: SkeletonTableProps) {
1110 < thead >
1211 < tr >
1312 { 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+ />
1621 </ th >
1722 ) ) }
1823 </ tr >
1924 </ thead >
2025 < tbody >
21- { [ ...Array ( 5 ) ] . map ( ( _ , rowIndex :any ) => (
26+ { [ ...Array ( 5 ) ] . map ( ( _ , rowIndex : any ) => (
2227 < 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+ />
2637 </ td >
2738 ) ) }
2839 </ tr >
@@ -32,4 +43,4 @@ function SkeletonTable({ columns }: SkeletonTableProps) {
3243 ) ;
3344}
3445
35- export default SkeletonTable ;
46+ export default SkeletonTable ;
0 commit comments