import * as React from "react"; import { cn } from "@/lib/utils"; import { Check } from "lucide-react"; interface StepperProps extends React.HTMLAttributes { steps: string[]; currentStep: number; // 0-indexed orientation?: "horizontal" | "vertical"; } interface StepProps { label: string; stepNumber: number; isActive: boolean; isCompleted: boolean; isLast: boolean; orientation?: "horizontal" | "vertical"; } const Step = ({ label, stepNumber, isActive, isCompleted, isLast, orientation = "horizontal" }: StepProps) => { return (
{isCompleted ? ( ) : ( {stepNumber} )}
{label}
{!isLast && (
)}
); }; export function Stepper({ steps, currentStep, orientation = "horizontal", className, ...props }: StepperProps) { return (
{steps.map((step, index) => (
))}
); }