We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86a2e38 commit 26c8e50Copy full SHA for 26c8e50
1 file changed
src/components/LoadingIndicator.tsx
@@ -0,0 +1,16 @@
1
+interface LoadingIndicatorProps {
2
+ label?: string;
3
+ compact?: boolean;
4
+}
5
+
6
+export function LoadingIndicator({label = 'Loading...', compact = false}: LoadingIndicatorProps) {
7
+ return (
8
+ <div class={`flex items-center ${compact ? 'gap-2' : 'gap-3 justify-center py-8'}`}>
9
+ <div
10
+ class={`rounded-full border-2 border-zinc-300 border-t-blue-500 dark:border-zinc-600 dark:border-t-blue-400 animate-spin ${compact ? 'w-4 h-4' : 'w-6 h-6'}`}
11
+ aria-hidden="true"
12
+ />
13
+ <span class={`${compact ? 'text-sm' : 'text-sm text-zinc-500 dark:text-zinc-400'}`}>{label}</span>
14
+ </div>
15
+ );
16
0 commit comments