import * as React from "react"; import { cn } from "./lib/utils"; export interface StepItem { title: string; description?: string; } export interface StepsProps extends React.HTMLAttributes { steps: StepItem[]; current: number; // 0-indexed className?: string; } export function Steps({ steps, current, className, ...props }: StepsProps) { return (
    {steps.map((step, idx) => { const isCompleted = idx < current; const isCurrent = idx === current; const isPending = idx > current; const isLast = idx === steps.length - 1; return (
  1. {isCompleted ? "✓" : idx + 1}
    {step.title} {step.description ? ( {step.description} ) : null}
  2. ); })}
); }