/** * ============================================================================= * LOADING SPINNER COMPONENT * ============================================================================= * * Animated loading indicator. * * INTERVIEW NOTES: * - CSS animations are performant (GPU accelerated) * - aria-busy and role attributes ensure accessibility * - Size variants allow flexible usage */ interface LoadingSpinnerProps { /** Size of the spinner */ size?: 'sm' | 'md' | 'lg'; /** Display full screen with overlay */ fullScreen?: boolean; /** Custom class names */ className?: string; } const sizeClasses = { sm: 'w-4 h-4 border-2', md: 'w-8 h-8 border-3', lg: 'w-12 h-12 border-4', }; export default function LoadingSpinner({ size = 'md', fullScreen = false, className = '', }: LoadingSpinnerProps) { const spinner = (
); if (fullScreen) { return (
{spinner}

Loading...

); } return spinner; }