mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
fix: overloading slider on exceeding max limits in pricing tier (#1530)
This commit is contained in:
committed by
GitHub
parent
9971662077
commit
22f579389a
@@ -18,7 +18,9 @@ export const BillingSlider = React.forwardRef<React.ElementRef<typeof SliderPrim
|
||||
className={cn("relative flex w-full touch-none select-none items-center", className)}
|
||||
{...props}>
|
||||
<SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-slate-300">
|
||||
<div style={{ width: `${(value / max) * 100}%` }} className="absolute h-full bg-slate-800"></div>
|
||||
<div
|
||||
style={{ width: `calc(${Math.min(value / max, 0.93) * 100}%)` }}
|
||||
className="absolute h-full bg-slate-800"></div>
|
||||
<div
|
||||
style={{
|
||||
width: `${((freeTierLimit - value) / max) * 100}%`,
|
||||
@@ -27,11 +29,13 @@ export const BillingSlider = React.forwardRef<React.ElementRef<typeof SliderPrim
|
||||
className="absolute h-full bg-slate-500"></div>
|
||||
</SliderPrimitive.Track>
|
||||
|
||||
<div style={{ left: `${(value / max) * 100}%` }} className="absolute mt-4 h-6 w-px bg-slate-500"></div>
|
||||
<div
|
||||
style={{ left: `calc(${Math.min(value / max, 0.93) * 100}%)` }}
|
||||
className="absolute mt-4 h-6 w-px bg-slate-500"></div>
|
||||
|
||||
<div
|
||||
style={{ left: `calc(${(value / max) * 100}% + 0.5rem)` }}
|
||||
className="absolute mt-12 text-sm text-slate-700 dark:text-slate-200">
|
||||
style={{ left: `calc(${Math.min(value / max, 0.93) * 100}% + 0.5rem)` }}
|
||||
className="absolute mt-16 text-sm text-slate-700 dark:text-slate-200">
|
||||
<p className="text-xs">
|
||||
Current:
|
||||
<br />
|
||||
|
||||
Reference in New Issue
Block a user