import { cn } from '@/lib/utils';
import { HTMLAttributes } from 'react';
interface LoadingSpinnerProps extends HTMLAttributes {
size?: 'sm' | 'md' | 'lg';
}
/**
* Loading spinner component with smooth animation.
*
* @param size - Size variant (default: md)
* @param className - Additional CSS classes
*/
export function LoadingSpinner({ size = 'md', className, ...props }: LoadingSpinnerProps) {
const sizeClasses = {
sm: 'w-4 h-4 border-2',
md: 'w-8 h-8 border-3',
lg: 'w-12 h-12 border-4',
};
return (
);
}
/**
* Full-page loading spinner with backdrop.
*/
export function FullPageLoadingSpinner() {
return (
);
}
/**
* Inline loading text with spinner.
*/
export function LoadingText({ text = 'Loading...' }: { text?: string }) {
return (
{text}
);
}