import React from "react"
interface Step {
number: number
title: string
}
interface StepIndicatorProps {
currentStep: number
steps: Step[]
}
export function StepIndicator({ currentStep, steps }: StepIndicatorProps) {
return (
{steps.map((step, index) => {
const isActive = currentStep >= step.number
const isLast = index === steps.length - 1
return (
{step.number}
{step.title}
{!isLast && (
step.number ? "bg-blue-600" : "bg-gray-200"}`} />
)}
)
})}
)
}