Spaces:
Runtime error
Runtime error
Download components/ui/TopProgressBar.tsx from Learn8/README: direct link, hf CLI and curl.
- Browser
- Download file 561 Bytes
-
https://huggingface.co/spaces/Learn8/README/resolve/main/components/ui/TopProgressBar.tsx
- Command line
-
hf download hf://spaces/Learn8/README/components/ui/TopProgressBar.tsx
-
curl -L -o TopProgressBar.tsx https://huggingface.co/spaces/Learn8/README/resolve/main/components/ui/TopProgressBar.tsx
561 Bytes
| import React from "react"; | |
| interface TopProgressBarProps { | |
| progress: number; // 0-100 | |
| className?: string; | |
| } | |
| export default function TopProgressBar({ | |
| progress, | |
| className = "", | |
| }: TopProgressBarProps) { | |
| return ( | |
| <div | |
| className={`w-full h-3 rounded-full bg-brand-gray-200 overflow-hidden ${className}`} | |
| > | |
| <div | |
| className="h-full rounded-full bg-gradient-to-r from-brand-teal to-brand-green transition-all duration-500 ease-out" | |
| style={{ width: `${Math.min(100, Math.max(0, progress))}%` }} | |
| /> | |
| </div> | |
| ); | |
| } | |