Files
paperclip/ui/src/components/PageSkeleton.tsx
Forgotten fad1bd27ce Add shared UI primitives, contexts, and reusable components
Add shadcn components: avatar, breadcrumb, checkbox, collapsible,
command, dialog, dropdown-menu, label, popover, scroll-area, sheet,
skeleton, tabs, textarea, tooltip. Add shared components: BreadcrumbBar,
CommandPalette, CompanySwitcher, CommentThread, EmptyState, EntityRow,
FilterBar, InlineEditor, MetricCard, PageSkeleton, PriorityIcon,
PropertiesPanel, StatusIcon, SidebarNavItem/Section. Add contexts for
breadcrumbs, dialogs, and side panels. Add keyboard shortcut hook and
utility helpers. Update layout, sidebar, and main app shell.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:00 -06:00

44 lines
1.2 KiB
TypeScript

import { Skeleton } from "@/components/ui/skeleton";
interface PageSkeletonProps {
variant?: "list" | "detail";
}
export function PageSkeleton({ variant = "list" }: PageSkeletonProps) {
if (variant === "detail") {
return (
<div className="space-y-6">
<div className="space-y-2">
<Skeleton className="h-4 w-24" />
<Skeleton className="h-8 w-64" />
<Skeleton className="h-4 w-full max-w-md" />
</div>
<div className="space-y-3">
<Skeleton className="h-10 w-full" />
<Skeleton className="h-32 w-full" />
</div>
<div className="space-y-2">
<Skeleton className="h-4 w-32" />
<Skeleton className="h-20 w-full" />
<Skeleton className="h-20 w-full" />
</div>
</div>
);
}
return (
<div className="space-y-4">
<div className="flex items-center justify-between">
<Skeleton className="h-6 w-32" />
<Skeleton className="h-8 w-24" />
</div>
<Skeleton className="h-10 w-full max-w-sm" />
<div className="space-y-1">
{Array.from({ length: 8 }).map((_, i) => (
<Skeleton key={i} className="h-10 w-full" />
))}
</div>
</div>
);
}