Files
photography/admin/src/components/ui/progress.tsx
xujiang 0ff0a7e995 fix: 修复 Prettier 格式检查和依赖问题
## 修复内容

### 依赖修复
- 安装缺失的 `prettier-plugin-organize-imports` 插件
- 修复 CI/CD 中的 "Cannot find package" 错误
- 更新 package.json 和 bun.lockb

### 代码格式化
- 对所有源文件运行 Prettier 自动格式化
- 统一 import 语句排序和组织
- 修复 49 个文件的代码风格问题
- 确保所有文件符合项目代码规范

### 格式化改进
- Import 语句自动排序和分组
- 统一缩进和空格规范
- 标准化引号和分号使用
- 优化对象和数组格式

## 验证结果
 `bun run format` 通过 - 所有文件格式正确
 `prettier-plugin-organize-imports` 正常工作
 CI/CD 格式检查将通过

## 技术细节
- 添加 prettier-plugin-organize-imports@^4.1.0
- 保持现有 .prettierrc 配置不变
- 格式化涉及 TS/TSX/JS/JSX/JSON/CSS/MD 文件
- 代码功能完全不受影响,仅调整格式
2025-07-14 11:25:05 +08:00

24 lines
759 B
TypeScript

import * as ProgressPrimitive from '@radix-ui/react-progress'
import * as React from 'react'
import { cn } from '@/lib/utils'
const Progress = React.forwardRef<
React.ElementRef<typeof ProgressPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
>(({ className, value, ...props }, ref) => (
<ProgressPrimitive.Root
ref={ref}
className={cn('relative h-4 w-full overflow-hidden rounded-full bg-secondary', className)}
{...props}
>
<ProgressPrimitive.Indicator
className="h-full w-full flex-1 bg-primary transition-all"
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
/>
</ProgressPrimitive.Root>
))
Progress.displayName = ProgressPrimitive.Root.displayName
export { Progress }