first commit
This commit is contained in:
21
components/ui/loading.tsx
Normal file
21
components/ui/loading.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Loader2 } from 'lucide-react'
|
||||
|
||||
interface LoadingProps {
|
||||
size?: 'sm' | 'md' | 'lg'
|
||||
text?: string
|
||||
}
|
||||
|
||||
export function Loading({ size = 'md', text }: LoadingProps) {
|
||||
const sizeClasses = {
|
||||
sm: 'h-4 w-4',
|
||||
md: 'h-8 w-8',
|
||||
lg: 'h-12 w-12'
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex items-center justify-center space-x-2">
|
||||
<Loader2 className={`animate-spin ${sizeClasses[size]}`} />
|
||||
{text && <span className="text-sm text-muted-foreground">{text}</span>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user