import React from "react" import { cn } from "@/app/lib/utils" interface StepsProps { currentStep: number className?: string children: React.ReactNode } interface StepProps { title: string description?: string } export function Steps({ currentStep, className, children }: StepsProps) { const steps = React.Children.toArray(children) return (
{steps.map((step, index) => { const isActive = index === currentStep const isCompleted = index < currentStep return (
{isCompleted ? ( ) : ( index + 1 )}
{step}
{index < steps.length - 1 && (
)} ) })}
) } export function Step({ title, description }: StepProps) { return (
{title}
{description &&
{description}
}
) }