27 lines
709 B
TypeScript
27 lines
709 B
TypeScript
'use client'
|
|
|
|
import { cn } from '@/lib/utils'
|
|
|
|
export interface KriLoadingOverlayProps {
|
|
open: boolean
|
|
label?: string
|
|
className?: string
|
|
spinnerClassName?: string
|
|
}
|
|
|
|
export function KriLoadingOverlay({ open, label = '로딩 중', className, spinnerClassName }: KriLoadingOverlayProps) {
|
|
if (!open) return null
|
|
|
|
return (
|
|
<div
|
|
role="status"
|
|
aria-live="polite"
|
|
aria-label={label}
|
|
className={cn('fixed inset-0 z-[9999] flex items-center justify-center bg-black/70', className)}
|
|
>
|
|
<div className={cn('size-12 animate-spin rounded-full border-4 border-gray-400 border-t-white', spinnerClassName)} />
|
|
<span className="sr-only">{label}</span>
|
|
</div>
|
|
)
|
|
}
|