feat: add spinner
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
'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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user