Spaces:
Running on Zero
Running on Zero
deveshc23
feat: Add Free Gradio Space support, Git LFS tracking for data artifacts, and Quant Allocator
3e33e2e Download frontend/src/components/common/LoadingSkeleton.tsx from deveshc23/drift-quant: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/spaces/deveshc23/drift-quant/resolve/main/frontend/src/components/common/LoadingSkeleton.tsx
- Command line
-
hf download hf://spaces/deveshc23/drift-quant/frontend/src/components/common/LoadingSkeleton.tsx
-
curl -L -o LoadingSkeleton.tsx https://huggingface.co/spaces/deveshc23/drift-quant/resolve/main/frontend/src/components/common/LoadingSkeleton.tsx
1.19 kB
| export function LoadingSkeleton({ | |
| lines = 4, | |
| height = "20px", | |
| className = "", | |
| }: { | |
| lines?: number; | |
| height?: string | number; | |
| className?: string; | |
| }) { | |
| const heightStyle = typeof height === "number" ? `${height}px` : height; | |
| return ( | |
| <div className={`skeleton-container ${className}`}> | |
| {Array.from({ length: lines }).map((_, i) => ( | |
| <div | |
| key={i} | |
| className="skeleton-bar" | |
| style={{ height: heightStyle, width: i === lines - 1 ? "60%" : "100%" }} | |
| /> | |
| ))} | |
| </div> | |
| ); | |
| } | |
| export function CardSkeleton() { | |
| return ( | |
| <div className="skeleton-card"> | |
| <div className="skeleton-bar" style={{ height: "14px", width: "40%", marginBottom: "12px" }} /> | |
| <div className="skeleton-bar" style={{ height: "32px", width: "70%", marginBottom: "8px" }} /> | |
| <div className="skeleton-bar" style={{ height: "12px", width: "50%" }} /> | |
| </div> | |
| ); | |
| } | |
| export function ChartSkeleton({ height = 320 }: { height?: number }) { | |
| return ( | |
| <div className="skeleton-chart" style={{ height: `${height}px` }}> | |
| <div className="spinner" /> | |
| <span>Loading historical research series...</span> | |
| </div> | |
| ); | |
| } | |