mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
Adiciona prop indicatorClassName ao componente Progress. Orçamentos estourados e cartões com 100% do limite utilizado exibem a barra com indicador e fundo na cor destructive. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
809 B
TypeScript
38 lines
809 B
TypeScript
"use client";
|
|
|
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
import type * as React from "react";
|
|
|
|
import { cn } from "@/shared/utils/ui";
|
|
|
|
function Progress({
|
|
className,
|
|
indicatorClassName,
|
|
value,
|
|
...props
|
|
}: React.ComponentProps<typeof ProgressPrimitive.Root> & {
|
|
indicatorClassName?: string;
|
|
}) {
|
|
return (
|
|
<ProgressPrimitive.Root
|
|
data-slot="progress"
|
|
className={cn(
|
|
"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
|
|
className,
|
|
)}
|
|
{...props}
|
|
>
|
|
<ProgressPrimitive.Indicator
|
|
data-slot="progress-indicator"
|
|
className={cn(
|
|
"bg-primary h-full w-full flex-1 transition-all",
|
|
indicatorClassName,
|
|
)}
|
|
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
/>
|
|
</ProgressPrimitive.Root>
|
|
);
|
|
}
|
|
|
|
export { Progress };
|