Agents for developpement added + frontend add + backend added. Git viewer created + agent and template creator + layout and project creator
28 lines
754 B
TypeScript
28 lines
754 B
TypeScript
/** Spinner — an indeterminate loading indicator (LD). */
|
|
|
|
import { cn } from "../lib/cn";
|
|
|
|
export interface SpinnerProps {
|
|
/** Diameter in pixels. Defaults to 16. */
|
|
size?: number;
|
|
/** Extra classes (e.g. a colour override). */
|
|
className?: string;
|
|
/** Accessible label; defaults to "Loading". */
|
|
label?: string;
|
|
}
|
|
|
|
/** A CSS-only spinning ring that inherits the current text colour. */
|
|
export function Spinner({ size = 16, className, label = "Loading" }: SpinnerProps) {
|
|
return (
|
|
<span
|
|
role="status"
|
|
aria-label={label}
|
|
className={cn(
|
|
"inline-block animate-spin rounded-full border-2 border-current border-t-transparent",
|
|
className,
|
|
)}
|
|
style={{ width: size, height: size }}
|
|
/>
|
|
);
|
|
}
|