import { cn } from "@/lib/utils"; import { useTranslation } from "react-i18next"; type StepIndicatorProps = { steps: string[]; currentStep: number; variant?: "default" | "dots"; translationNameSpace?: string; }; export default function StepIndicator({ steps, currentStep, variant = "default", translationNameSpace, }: StepIndicatorProps) { const { t } = useTranslation(translationNameSpace); if (variant == "dots") { return (
{steps.map((_, idx) => (
idx ? "bg-muted-foreground" : "bg-muted", )} /> ))}
); } // Default variant (original behavior) return (
{steps.map((name, idx) => (
{idx + 1}
{t(name)}
))}
); }