headplane/app/components/Spinner.tsx

23 lines
462 B
TypeScript
Raw Normal View History

2024-12-31 10:30:14 +05:30
import clsx from 'clsx';
2024-03-30 04:12:37 -04:00
2024-12-31 10:30:14 +05:30
interface Props {
2024-03-30 04:12:37 -04:00
className?: string;
}
2024-12-31 10:30:14 +05:30
export default function Spinner({ className }: Props) {
2024-03-30 04:12:37 -04:00
return (
2024-12-31 10:30:14 +05:30
<div className={clsx('mr-1.5 inline-block align-middle mb-0.5', className)}>
2024-03-30 04:12:37 -04:00
<div
className={clsx(
'animate-spin rounded-full w-full h-full',
'border-2 border-current border-t-transparent',
2024-12-31 10:30:14 +05:30
className,
2024-03-30 04:12:37 -04:00
)}
2024-12-31 10:30:14 +05:30
role="status"
2024-03-30 04:12:37 -04:00
>
2024-12-31 10:30:14 +05:30
<span className="sr-only">Loading...</span>
2024-03-30 04:12:37 -04:00
</div>
</div>
2024-12-31 10:30:14 +05:30
);
2024-03-30 04:12:37 -04:00
}