23 lines
590 B
TypeScript
23 lines
590 B
TypeScript
|
|
import { cn } from '@/lib/utils/cn';
|
||
|
|
|
||
|
|
export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {}
|
||
|
|
|
||
|
|
export function Skeleton({ className, ...props }: SkeletonProps) {
|
||
|
|
return (
|
||
|
|
<div
|
||
|
|
className={cn('animate-pulse rounded-md bg-muted', className)}
|
||
|
|
{...props}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
export function SkeletonText({ className, ...props }: SkeletonProps) {
|
||
|
|
return (
|
||
|
|
<div className={cn('space-y-2', className)} {...props}>
|
||
|
|
<Skeleton className="h-4 w-full" />
|
||
|
|
<Skeleton className="h-4 w-5/6" />
|
||
|
|
<Skeleton className="h-4 w-4/6" />
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
}
|