mirror of
https://github.com/Novattz/creamlinux-installer.git
synced 2026-01-27 05:42:49 -05:00
add progress bar component and styling
This commit is contained in:
22
src/components/common/ProgressBar.tsx
Normal file
22
src/components/common/ProgressBar.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
interface ProgressBarProps {
|
||||
progress: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple progress bar component
|
||||
*/
|
||||
const ProgressBar = ({ progress }: ProgressBarProps) => {
|
||||
return (
|
||||
<div className="progress-container">
|
||||
<div className="progress-bar">
|
||||
<div
|
||||
className="progress-fill"
|
||||
style={{ width: `${Math.min(progress, 100)}%` }}
|
||||
/>
|
||||
</div>
|
||||
<span className="progress-text">{Math.round(progress)}%</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ProgressBar
|
||||
Reference in New Issue
Block a user