by codex: feat. General Improvements
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import { View } from "react-native";
|
||||
import { PROGRESS_THRESHOLDS } from "@/lib/constants";
|
||||
|
||||
interface ProgressBarProps {
|
||||
percent: number;
|
||||
}
|
||||
|
||||
function getBarColor(percent: number): string {
|
||||
if (percent >= 85) return "bg-red-500";
|
||||
if (percent >= 60) return "bg-yellow-400";
|
||||
if (percent >= PROGRESS_THRESHOLDS.danger) return "bg-red-500";
|
||||
if (percent >= PROGRESS_THRESHOLDS.warning) return "bg-yellow-400";
|
||||
return "bg-green-500";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user