import * as React from 'react'; import { Card, CardContent } from '../card'; import { Skeleton } from '../skeleton'; import { cn } from '../../shared/utils'; interface StatsCardSkeletonProps extends React.HTMLAttributes { /** Whether to show the icon placeholder on the right */ showIcon?: boolean; /** Whether to show the trend indicator placeholder */ showTrend?: boolean; } /** * Loading placeholder for `StatsCard`. * * @description * Mirrors the visual layout of `StatsCard`: title line, large value + optional * trend badge, description line below, and an optional icon block on the right. * * @example * ```tsx * {isLoading ? : } * ``` */ function StatsCardSkeleton({ showIcon = true, showTrend = true, className, ...props }: StatsCardSkeletonProps) { return (
{/* Title */} {/* Value + trend */}
{showTrend && }
{/* Description */}
{/* Icon block */} {showIcon && }
); } StatsCardSkeleton.displayName = 'StatsCardSkeleton'; export { StatsCardSkeleton }; export type { StatsCardSkeletonProps };