import { cn } from "@/lib/utils" interface StepIndicatorProps { currentStep: number steps: { id: number; title: string; subtitle: string }[] } export function StepIndicator({ currentStep, steps }: StepIndicatorProps) { return (
{steps.map((step, index) => (
step.id ? "border-green-500 bg-green-500 text-white" : currentStep === step.id ? "border-blue-500 bg-white text-blue-500" : "border-gray-300 bg-white text-gray-300", )} > {currentStep > step.id ? ( ) : ( step.id )}
= step.id ? "text-blue-500" : "text-gray-400")}> 步骤 {step.id}
= step.id ? "text-blue-500" : "text-gray-400")}> {step.subtitle}
{index < steps.length - 1 && (
step.id ? "bg-green-500" : "bg-gray-300")} /> )}
))}
) }