import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { cn } from '@/lib/utils'; import { type VariantProps, cva } from 'class-variance-authority'; import type { PropsWithChildren } from 'react'; const containerVariants = cva('', { variants: { variant: { loading: '', noData: 'text-muted-foreground text-sm', }, }, defaultVariants: { variant: 'loading', }, }); export type ChartSkeletonVariants = VariantProps; interface ChartSkeletonProps extends ChartSkeletonVariants, PropsWithChildren { title: string; description?: string; } export function ChartSkeleton({ variant = 'loading', children, title, description }: ChartSkeletonProps) { return ( {title} {description && {description}}
{variant === 'loading' ? <> : children}
); }