openreader/src/components/Spinner.tsx
Richard R fe9104e8fc docs(pdf,spinner,config): update parse state UI, spinner theming, and worker env docs
Revise PDF viewer to introduce an explicit 'unknown' parse state and improve
loader and status messaging for better user clarity. Refactor Spinner to use
'currentColor' for border styling and simplify conditional rendering based on
className. Expand compute worker .env.example with explicit concurrency,
timeout, and job attempt variables for enhanced configuration transparency.
2026-05-21 11:59:12 -06:00

20 lines
No EOL
521 B
TypeScript

// Loading spinner component
interface SpinnerProps {
className?: string;
}
export function LoadingSpinner({ className }: SpinnerProps = {}) {
if (className) {
return (
<div
className={`animate-spin rounded-full border-2 border-current border-t-transparent ${className}`}
/>
);
}
return (
<div className="absolute inset-0 flex items-center justify-center">
<div className="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" />
</div>
);
}