import { Skeleton } from "@/components/ui/skeleton"; import { cn } from "@/lib/utils"; /** Page title + optional action buttons, matching the common page header layout. */ export function PageHeaderSkeleton({ actions = 0, subtitle = false, }: { actions?: number; subtitle?: boolean; }) { return (
{subtitle && }
{actions > 0 && (
{Array.from({ length: actions }).map((_, i) => ( ))}
)}
); } /** Mirrors the recipe GridCard: aspect-video thumb, title, description, meta row. */ export function RecipeCardSkeleton() { return (
); } /** Grid of RecipeCardSkeletons; default classes match RecipesGrid's grid view. */ export function RecipeCardGridSkeleton({ count = 8, className, }: { count?: number; className?: string; }) { return (
{Array.from({ length: count }).map((_, i) => ( ))}
); } /** Mirrors a feed article: avatar + author line, title, description, meta chips. */ export function FeedItemSkeleton() { return (
); } /** Bordered row card, matching list rows (shopping lists, pantry items, etc.). */ export function ListRowSkeleton() { return (
); } /** Small bordered info card, matching search/explore result cards. */ export function InfoCardSkeleton() { return (
); } /** Square photo tile with a caption line, matching profile recipe tiles. */ export function SquareTileSkeleton() { return (
); } /** Admin overview stat card. */ export function StatCardSkeleton() { return (
); } /** Simple bordered table: one header row and `rows` body rows. */ export function TableSkeleton({ rows = 8 }: { rows?: number }) { return (
{Array.from({ length: rows }).map((_, i) => (
))}
); }