The weeb for the next gen discord boat - Wamellow
wamellow.com
bot
discord
1import { cn } from "@/utils/cn";
2
3export interface SkeletonProps
4 extends React.HTMLAttributes<HTMLDivElement> {
5 isLoading?: boolean;
6}
7
8function Skeleton({
9 className,
10 children,
11 isLoading,
12 ...props
13}: SkeletonProps) {
14 if (!isLoading && isLoading !== undefined) {
15 return (
16 <div className={className} {...props}>
17 {children}
18 </div>
19 );
20 }
21
22 return (
23 <div
24 className={cn("animate-pulse rounded-md bg-primary/10", className)}
25 {...props}
26 />
27 );
28}
29
30export { Skeleton };