Skip to content

Commit

Permalink
Add ProgressBar Component
Browse files Browse the repository at this point in the history
  • Loading branch information
tsar-boomba committed Sep 5, 2024
1 parent b209839 commit 537448a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions web/components/atoms/ProgressBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
interface Props {
color?: string;
/** A number between 0 and 100 indicating the progress percentage */
progress: number;
}

export default function ProgressBar({
color,
progress
}: Props) {
return (
<div className="h-[6px] relative rounded-full">
<div style={{ backgroundColor: color, width: `${progress}%` }} className="rounded-full absolute top-0 left-0 bottom-0 transition-all" />
</div>
)
}

0 comments on commit 537448a

Please sign in to comment.