mirror of
https://github.com/fankes/komari-theme-purcarte.git
synced 2025-10-20 12:29:22 +08:00
feat: 添加列表视图进度条选项并优化进度条显示
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
import { getProgressBarClass } from "@/utils";
|
||||
|
||||
export const ProgressBar = ({
|
||||
value,
|
||||
h = "h-3",
|
||||
className,
|
||||
}: {
|
||||
value: number;
|
||||
h?: string;
|
||||
className?: string;
|
||||
}) => (
|
||||
<div className="w-full bg-gray-200 rounded-full h-3 dark:bg-gray-700">
|
||||
<div className={`w-full bg-gray-200 rounded-full ${h} dark:bg-gray-700`}>
|
||||
<div
|
||||
className={`h-3 rounded-full transition-all duration-500 ${className}`}
|
||||
className={`${h} rounded-full transition-all duration-500 ${getProgressBarClass(
|
||||
value
|
||||
)} ${className}`}
|
||||
style={{ width: `${value}%` }}></div>
|
||||
</div>
|
||||
);
|
||||
|
Reference in New Issue
Block a user