infoalloggi-monorepo/apps/infoalloggi/src/components/spinner.tsx

34 lines
639 B
TypeScript
Raw Normal View History

2025-08-04 17:45:44 +02:00
import type { SVGProps } from "react";
import { cn } from "src/lib/utils";
interface ISVGProps extends SVGProps<SVGSVGElement> {
2025-08-28 18:27:07 +02:00
size?: number;
className?: string;
2025-08-04 17:45:44 +02:00
}
export const LoadingSpinner = ({
2025-08-28 18:27:07 +02:00
className,
size = 24,
...props
2025-08-04 17:45:44 +02:00
}: ISVGProps) => {
2025-08-28 18:27:07 +02:00
return (
<svg
height={size}
width={size}
xmlns="http://www.w3.org/2000/svg"
{...props}
className={cn("animate-spin antialiased", className)}
fill="none"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
viewBox="0 0 24 24"
>
<title>spinner</title>
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
</svg>
);
2025-08-04 17:45:44 +02:00
};