mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-06 05:30:07 +00:00
feat: refactor public note
This commit is contained in:
21
src/components/RemainPercentBar.tsx
Normal file
21
src/components/RemainPercentBar.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
import { Progress } from "./ui/progress"
|
||||
|
||||
export default function RemainPercentBar({
|
||||
value,
|
||||
className,
|
||||
}: {
|
||||
value: number
|
||||
className?: string
|
||||
}) {
|
||||
return (
|
||||
<Progress
|
||||
aria-label={"Server Usage Bar"}
|
||||
aria-labelledby={"Server Usage Bar"}
|
||||
value={value}
|
||||
indicatorClassName={value < 30 ? "bg-red-500" : value < 70 ? "bg-orange-400" : "bg-green-500"}
|
||||
className={cn("h-[3px] rounded-sm w-[70px]", className)}
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user