@@ -60,6 +60,23 @@ export function UsageBar({
60
60
/>
61
61
</ motion . div >
62
62
) }
63
+ < motion . div
64
+ initial = { { width : usagePercentage / startFactor + "%" } }
65
+ animate = { { width : usagePercentage + "%" } }
66
+ transition = { { duration : 1.5 , type : "spring" } }
67
+ style = { { width : `${ usagePercentage } %` } }
68
+ className = { cn (
69
+ "absolute h-3 rounded-l-sm" ,
70
+ tierLimit && current > tierLimit ? "bg-green-700" : "bg-green-600"
71
+ ) }
72
+ >
73
+ < Legend
74
+ text = "Used:"
75
+ value = { formatCurrency ( current , false ) }
76
+ position = "topRow1"
77
+ percentage = { usagePercentage }
78
+ />
79
+ </ motion . div >
63
80
{ tierLimit !== undefined && (
64
81
< motion . div
65
82
initial = { { width : tierRunLimitPercentage / startFactor + "%" } }
@@ -92,23 +109,7 @@ export function UsageBar({
92
109
/>
93
110
</ motion . div >
94
111
) }
95
- < motion . div
96
- initial = { { width : usagePercentage / startFactor + "%" } }
97
- animate = { { width : usagePercentage + "%" } }
98
- transition = { { duration : 1.5 , type : "spring" } }
99
- style = { { width : `${ usagePercentage } %` } }
100
- className = { cn (
101
- "absolute h-3 rounded-l-sm" ,
102
- tierLimit && current > tierLimit ? "bg-rose-600" : "bg-green-600"
103
- ) }
104
- >
105
- < Legend
106
- text = "Used:"
107
- value = { formatCurrency ( current , false ) }
108
- position = "topRow1"
109
- percentage = { usagePercentage }
110
- />
111
- </ motion . div >
112
+
112
113
< motion . div
113
114
initial = { { width : usageCappedToLimitPercentage / startFactor + "%" } }
114
115
animate = { { width : usageCappedToLimitPercentage + "%" } }
0 commit comments