import type { StackProps } from '@chakra-ui/react'; import { chakra } from '@chakra-ui/react'; import React from 'react'; import type { Step } from './types'; import { Skeleton } from 'toolkit/chakra/skeleton'; import VerificationStep from './VerificationStep'; export interface Props { currentStep: string; currentStepPending?: boolean; steps: Array; isLoading?: boolean; rightSlot?: React.ReactNode; className?: string; itemProps?: StackProps; } const VerificationSteps = ({ currentStep, currentStepPending, steps, isLoading, rightSlot, className, itemProps }: Props) => { const currentStepIndex = steps.findIndex((step) => { const label = typeof step === 'string' ? step : step.label; return label === currentStep; }); return ( { steps.map((step, index) => ( )) } { rightSlot } ); }; export default chakra(VerificationSteps);