website refactor
This commit is contained in:
27
apps/website/ui/LoadingSpinner.tsx
Normal file
27
apps/website/ui/LoadingSpinner.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import React from 'react';
|
||||
|
||||
interface LoadingSpinnerProps {
|
||||
size?: number;
|
||||
color?: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function LoadingSpinner({ size = 8, color = '#3b82f6', className = '' }: LoadingSpinnerProps) {
|
||||
const style: React.CSSProperties = {
|
||||
width: `${size * 0.25}rem`,
|
||||
height: `${size * 0.25}rem`,
|
||||
border: '2px solid transparent',
|
||||
borderTopColor: color,
|
||||
borderLeftColor: color,
|
||||
borderRadius: '9999px',
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`animate-spin ${className}`}
|
||||
style={style}
|
||||
role="status"
|
||||
aria-label="Loading"
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user