'use client'; import React from 'react'; import { Check, X, Loader2 } from 'lucide-react'; import { cn } from '@/lib/utils'; // --------------------------------------------------------------------------- // Types // --------------------------------------------------------------------------- export type StepState = 'waiting' | 'active' | 'complete' | 'failed'; export interface DeployStepIndicatorProps { label: string; state: StepState; index: number; isLast?: boolean; } // --------------------------------------------------------------------------- // Component // --------------------------------------------------------------------------- export function DeployStepIndicator({ label, state, index, isLast = false, }: DeployStepIndicatorProps) { return (
{/* Step circle */}
{/* Pulse ring for active */} {state === 'active' && ( )} {/* Icon */} {state === 'complete' && } {state === 'failed' && } {state === 'active' && ( )} {state === 'waiting' && {index + 1}}
{/* Label */} {label}
{/* Connector line */} {!isLast && (
)}
); }