import "./LoadingSpinner.css"; interface LoadingSpinnerProps { /** Already-translated text shown beside the spinner (omit for icon-only). */ label?: string; /** Icon size in px. Defaults to 14 to match inline loading text. */ size?: number; /** Extra class on the wrapper, e.g. to slot into a section's layout. */ className?: string; } /** * Shared loading indicator: an animated spinner plus optional label. * * Most loading states across the dashboard historically rendered bare * "Loading…" text with no spinner, so nothing actually spun. Drop this inside * the existing loading container (keeping its class for layout) and pass the * translated label to get a consistent animated spinner everywhere. * * The icon is a self-contained inline SVG (visually identical to lucide's * Loader2) rather than a `lucide-react` import, so it renders in component * tests that stub `lucide-react` with a partial mock. It spins via the global * `.animate-spin` keyframe in styles.css. */ export const LoadingSpinner = ({ label, size = 14, className }: LoadingSpinnerProps) => ( {label ? {label} : null} );