Files
jiang13-forum/frontend/src/components/ui/spinner.tsx
freefire e1c1708715 初始提交:姜十三论坛 Jiang13 Forum
轻量自用论坛,Go 单二进制 + React SPA 内嵌 + SQLite。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 21:08:52 +08:00

20 lines
484 B
TypeScript

import { Loader2 } from 'lucide-react';
import { cn } from '@/lib/utils';
interface SpinnerProps {
className?: string;
size?: 'sm' | 'md' | 'lg';
}
const sizeMap = { sm: 'h-4 w-4', md: 'h-5 w-5', lg: 'h-8 w-8' };
/** 加载指示器,替代 Arco Spin */
export function Spinner({ className, size = 'md' }: SpinnerProps) {
return (
<Loader2
className={cn('animate-spin text-[var(--j13-green)]', sizeMap[size], className)}
aria-label="加载中"
/>
);
}