mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-13 20:38:20 +08:00
23 lines
435 B
TypeScript
23 lines
435 B
TypeScript
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
|