I need the lines to be even in terms of size and correctly placed. Here is my current code:
//StepIndicator.tsx
import React from 'react';
const StepIndicator = ({ currentStep, steps }: { currentStep: number, steps: string[] }) => {
return (
<div className="flex justify-center items-center mb-4">
{steps.map((step, index) => (
<div key={index} className="flex flex-col items-center mx-2">
{/* Circle */}
<div className={`h-6 w-6 rounded-full flex items-center justify-center text-xs ${index <= currentStep ? 'bg-green-500' : 'bg-white'} border border-gray-300`}>
{index + 1}
</div>
{/* Step Name */}
<span className={`text-sm text-center mt-1 ${index <= currentStep ? 'text-green-500' : 'text-white'}`}>
{step}
</span>
</div>
))}
{steps.slice(0, -1).map((_, index) => (
<div key={index} className={`h-1 w-12 bg-gray-300 mx-2`}></div>
))}
</div>
);
}
export default StepIndicator;```