import { Card } from './Card';
import { __ } from '../../lib/i18n';
const pulse = 'animate-pulse rounded-md bg-slate-200/80';
export function SkeletonLine({ className = '' }: { className?: string }) {
return
;
}
export function SkeletonCircle({ className = 'h-10 w-10' }: { className?: string }) {
return ;
}
/** Generic card-sized placeholder. */
export function SkeletonCard({ rows = 3 }: { rows?: number }) {
return (
{Array.from({ length: rows }).map((_, i) => (
))}
);
}
/** Stat tiles (dashboard). */
export function SkeletonStatGrid({ count = 4 }: { count?: number }) {
return (
{Array.from({ length: count }).map((_, i) => (
))}
);
}
type TableSkeletonProps = {
columns: number;
rows?: number;
};
/** Table body placeholder — use inside a table layout matching {@link DataTable}. */
export function TableSkeleton({ columns, rows = 8 }: TableSkeletonProps) {
return (
{Array.from({ length: rows }).map((_, ri) => (
{Array.from({ length: columns }).map((_, ci) => (
|
|
))}
))}
);
}
/** Course builder: left step rail + main form panels. */
export function CourseBuilderSkeleton() {
return (
{Array.from({ length: 5 }).map((_, i) => (
))}
);
}
/** Full table chrome matching DataTable layout. */
export function DataTableSkeleton({ headers, rows = 8 }: { headers: string[]; rows?: number }) {
const n = headers.length;
return (
{headers.map((h) => (
|
{h}
|
))}
);
}