25 lines
447 B
TypeScript
25 lines
447 B
TypeScript
import { cn } from '@/lib/utils';
|
|
|
|
interface LoadingSpinnerProps {
|
|
className?: string;
|
|
size?: 'sm' | 'md' | 'lg';
|
|
}
|
|
|
|
export function LoadingSpinner({ className, size = 'md' }: LoadingSpinnerProps) {
|
|
const sizeClasses = {
|
|
sm: 'h-4 w-4',
|
|
md: 'h-6 w-6',
|
|
lg: 'h-8 w-8'
|
|
};
|
|
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'animate-spin rounded-full border-2 border-gray-300 border-t-transparent',
|
|
sizeClasses[size],
|
|
className
|
|
)}
|
|
/>
|
|
);
|
|
}
|