learning_ai_common_plat/packages/dashboard-components/src/LoadingSkeleton.tsx
2026-03-19 21:25:30 -07:00

21 lines
561 B
TypeScript

import type { ReactNode } from 'react';
export interface LoadingSkeletonProps {
rows?: number;
className?: string;
}
export function LoadingSkeleton({ rows = 3, className = '' }: LoadingSkeletonProps): ReactNode {
return (
<div className={`space-y-3 ${className}`} role="status" aria-label="Loading content">
{Array.from({ length: rows }).map((_, i) => (
<div
key={i}
className="h-12 rounded animate-pulse"
style={{ backgroundColor: 'var(--color-muted, #e5e7eb)' }}
/>
))}
</div>
);
}