Spaces:
Build error
Build error
File size: 435 Bytes
a8b3f00 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
type ProgressBarProps = {
percent: number
color: string
}
const ProgressBar = ({
percent = 0,
color = '#2970FF',
}: ProgressBarProps) => {
return (
<div className='bg-[#F2F4F7] rounded-[4px] overflow-hidden'>
<div
className='h-2 rounded-[4px]'
style={{
width: `${Math.min(percent, 100)}%`,
backgroundColor: color,
}}
/>
</div>
)
}
export default ProgressBar
|