fix: Update PatternInfoSkeleton to match actual PatternInfo layout

Replace generic key-value skeleton with a proper representation that matches the actual PatternInfo component structure:
- Three-column grid for Size, Stitches, and Colors stats
- Separator line between sections
- Color swatches row with circular placeholders

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Jan-Henrik Bruhn 2025-12-22 11:11:47 +01:00
parent 9337fdf347
commit b995eb898e

View file

@ -65,16 +65,36 @@ export function PatternCanvasSkeleton() {
export function PatternInfoSkeleton() { export function PatternInfoSkeleton() {
return ( return (
<div className="mt-4"> <div className="mb-3">
<SkeletonLoader className="h-6 w-40 mb-4" variant="text" /> {/* Three column grid matching PatternInfo stats */}
<div className="bg-gray-200 dark:bg-gray-900 p-4 rounded-lg space-y-3"> <div className="grid grid-cols-3 gap-2 text-xs mb-2">
{[1, 2, 3, 4].map((i) => ( {[1, 2, 3].map((i) => (
<div key={i} className="flex justify-between"> <div
<SkeletonLoader className="h-4 w-24" variant="text" /> key={i}
<SkeletonLoader className="h-4 w-32" variant="text" /> className="bg-gray-200 dark:bg-gray-700/50 p-2 rounded"
>
<SkeletonLoader className="h-3 w-12 mb-1" variant="text" />
<SkeletonLoader className="h-4 w-16" variant="text" />
</div> </div>
))} ))}
</div> </div>
{/* Separator */}
<div className="h-px bg-gray-200 dark:bg-gray-700 mb-3" />
{/* Color swatches row */}
<div className="flex items-center gap-2 mb-2">
<SkeletonLoader className="h-3 w-12" variant="text" />
<div className="flex gap-1">
{[1, 2, 3, 4, 5].map((i) => (
<SkeletonLoader
key={i}
className="w-3 h-3 rounded-full"
variant="circle"
/>
))}
</div>
</div>
</div> </div>
); );
} }