20 lines
665 B
TypeScript
20 lines
665 B
TypeScript
'use client';
|
|
|
|
type SpinnerProps = {
|
|
text?: string;
|
|
};
|
|
|
|
export default function Spinner({ text = '' }: SpinnerProps) {
|
|
return (
|
|
<div className="relative flex items-center justify-center min-h-screen bg-primary text-primary transition-theme">
|
|
<div className="absolute text-muted text-sm tracking-widest">{text}</div>
|
|
|
|
{/* Spinner */}
|
|
<div className="relative h-14 w-14">
|
|
<div className="absolute inset-0 rounded-full border-4 border-muted transition-theme" />
|
|
<div className="absolute inset-0 rounded-full border-4 border-transparent border-t-[var(--accent)] animate-spin transition-theme" />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|