Complete the migration of all inline `animate-pulse bg-muted` patterns to the shared `<Skeleton>` component with premium shimmer animation. Covers: UserProfilePage, SearchPage, CourseDetailView, ProductDetailView, NotificationsPage, ChatMessages, SessionsPage, RegisterPage, AudioPlayer, DataList, AccountSettings, Dialog, CourseLearningView, TwoFactorSetup, ProjectsManager, GoLiveView, ConnectivityView, AIToolsView, CloudSettingsView, EquipmentDetailView, NotificationMenu, PlaybackHeatmap, ProjectDetailView, AvatarUpload, ShareLinkManager, OptimizedImage, BlurPlaceholder. Co-authored-by: Cursor <cursoragent@cursor.com>
35 lines
881 B
TypeScript
35 lines
881 B
TypeScript
import { Skeleton } from '@/components/ui/skeleton';
|
|
import { cn } from '@/lib/utils';
|
|
import { SIZE_CLASSES } from './types';
|
|
import type { AvatarUploadProps } from './types';
|
|
|
|
interface AvatarUploadSkeletonProps {
|
|
size?: NonNullable<AvatarUploadProps['size']>;
|
|
className?: string;
|
|
}
|
|
|
|
export function AvatarUploadSkeleton({
|
|
size = 'lg',
|
|
className,
|
|
}: AvatarUploadSkeletonProps) {
|
|
const sizeClass = SIZE_CLASSES[size];
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'flex flex-col items-center gap-4',
|
|
className,
|
|
)}
|
|
>
|
|
<Skeleton
|
|
className={cn(
|
|
'rounded-full border-2 border-dashed border-muted',
|
|
sizeClass,
|
|
)}
|
|
/>
|
|
<div className="flex flex-col items-center gap-2">
|
|
<Skeleton className="h-9 w-36 rounded-md" />
|
|
<Skeleton className="h-3 w-56 rounded" />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|