Spaces:
Sleeping
Sleeping
Download components/ui/LoadingSpinner.tsx from Tahasaif3/taskflow-frontend: direct link, hf CLI and curl.
- Browser
- Download file 795 Bytes
-
https://huggingface.co/spaces/Tahasaif3/taskflow-frontend/resolve/main/components/ui/LoadingSpinner.tsx
- Command line
-
hf download hf://spaces/Tahasaif3/taskflow-frontend/components/ui/LoadingSpinner.tsx
-
curl -L -o LoadingSpinner.tsx https://huggingface.co/spaces/Tahasaif3/taskflow-frontend/resolve/main/components/ui/LoadingSpinner.tsx
795 Bytes
| import React from 'react'; | |
| interface LoadingSpinnerProps { | |
| size?: 'sm' | 'md' | 'lg'; | |
| className?: string; | |
| } | |
| export function LoadingSpinner({ size = 'md', className = '' }: LoadingSpinnerProps) { | |
| const sizeClasses = { | |
| sm: 'w-4 h-4', | |
| md: 'w-8 h-8', | |
| lg: 'w-12 h-12' | |
| }; | |
| const borderSize = { | |
| sm: 'border-2', | |
| md: 'border-4', | |
| lg: 'border-4' | |
| }; | |
| return ( | |
| <div className={`inline-block ${sizeClasses[size]} ${borderSize[size]} rounded-full border-current border-t-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite] ${className}`} | |
| role="status"> | |
| <span className="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"> | |
| Loading... | |
| </span> | |
| </div> | |
| ); | |
| } |