+ )
}
interface SkeletonCardProps {
- showImage?: boolean
- showTitle?: boolean
- showDescription?: boolean
- showFooter?: boolean
- className?: string
+ showImage?: boolean
+ showTitle?: boolean
+ showDescription?: boolean
+ showFooter?: boolean
+ className?: string
}
export function SkeletonCard({
- showImage = true,
- showTitle = true,
- showDescription = true,
- showFooter = false,
- className,
+ showImage = true,
+ showTitle = true,
+ showDescription = true,
+ showFooter = false,
+ className,
}: SkeletonCardProps) {
- return (
-
- {showImage && (
-
- )}
- {showTitle && (
-
- )}
- {showDescription && (
-
-
-
-
- )}
- {showFooter && (
-
-
-
-
- )}
+ return (
+
+ {showImage &&
}
+ {showTitle &&
}
+ {showDescription && (
+
+
+
- )
+ )}
+ {showFooter && (
+
+
+
+
+ )}
+
+ )
}
export function SkeletonAvatar({ size = 'md' }: { size?: 'sm' | 'md' | 'lg' | 'xl' }) {
- const sizeClasses = {
- sm: 'h-6 w-6',
- md: 'h-10 w-10',
- lg: 'h-12 w-12',
- xl: 'h-16 w-16',
- }
- return
+ const sizeClasses = {
+ sm: 'h-6 w-6',
+ md: 'h-10 w-10',
+ lg: 'h-12 w-12',
+ xl: 'h-16 w-16',
+ }
+ return
}
export function SkeletonButton({ variant = 'md' }: { variant?: 'sm' | 'md' | 'lg' }) {
- const sizeClasses = {
- sm: 'h-8 w-20',
- md: 'h-10 w-24',
- lg: 'h-12 w-32',
- }
- return
+ const sizeClasses = {
+ sm: 'h-8 w-20',
+ md: 'h-10 w-24',
+ lg: 'h-12 w-32',
+ }
+ return
}
// ============================================================================
@@ -126,102 +125,104 @@ export function SkeletonButton({ variant = 'md' }: { variant?: 'sm' | 'md' | 'lg
// ============================================================================
export function SkeletonMetricCard({ className }: { className?: string }) {
- return (
-
-
-
-
-
- )
+ return (
+
+
+
+
+
+ )
}
export function SkeletonEventRow({ className }: { className?: string }) {
- return (
-
- )
+ return (
+
+ )
}
export function SkeletonChart({ className }: { className?: string }) {
- return (
-
-
-
+ return (
+
+ )
}
export function SkeletonTable({ rows = 5, cols = 4 }: { rows?: number; cols?: number }) {
- return (
-
- {/* Header */}
-
- {Array.from({ length: cols }).map((_, i) => (
-
- ))}
-
- {/* Rows */}
- {Array.from({ length: rows }).map((_, rowIdx) => (
-
- {Array.from({ length: cols }).map((_, colIdx) => (
-
- ))}
-
- ))}
+ return (
+
+ {/* Header */}
+
+ {Array.from({ length: cols }).map((_, i) => (
+
+ ))}
+
+ {/* Rows */}
+ {Array.from({ length: rows }).map((_, rowIdx) => (
+
+ {Array.from({ length: cols }).map((_, colIdx) => (
+
+ ))}
- )
+ ))}
+
+ )
}
export function SkeletonDashboard() {
- return (
-
- {/* Header */}
-
-
- {/* Metrics Row */}
-
-
-
-
-
-
-
- {/* Main Content */}
-
+ return (
+
+ {/* Header */}
+
+
+ {/* Metrics Row */}
+
+
+
+
+
+
+
+ {/* Main Content */}
+
+
+ )
}