bolt.diy/app/shared/components/ui/Progress.tsx
KevIsDev 4d3222ee96 refactor: reorganize project structure by moving files to a more dev friendly setup
- Move stores/utils/types to their relative directories (i.e chat stores in chat directory)
- Move utility files to shared/utils
- Move component files to shared/components
- Move type definitions to shared/types
- Move stores to shared/stores
- Update import paths across the project
2025-06-16 15:33:59 +01:00

23 lines
683 B
TypeScript

import * as React from 'react';
import { classNames } from '~/shared/utils/classNames';
interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
value?: number;
}
const Progress = React.forwardRef<HTMLDivElement, ProgressProps>(({ className, value, ...props }, ref) => (
<div
ref={ref}
className={classNames('relative h-2 w-full overflow-hidden rounded-full bg-bolt-elements-background', className)}
{...props}
>
<div
className="h-full w-full flex-1 bg-bolt-elements-textPrimary transition-all"
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
/>
</div>
));
Progress.displayName = 'Progress';
export { Progress };