({ currentStep, steps })
| 39 | currentStep: number |
| 40 | steps: StepProps[] |
| 41 | }> = ({ currentStep, steps }) => ( |
| 42 | <div className="relative w-full"> |
| 43 | <div className="flex items-center justify-between"> |
| 44 | {steps.map((step, index) => ( |
| 45 | <React.Fragment key={step.label}> |
| 46 | <div className="flex flex-col items-center"> |
| 47 | <motion.div |
| 48 | className={`z-10 flex h-8 w-8 items-center justify-center rounded-full ${ |
| 49 | index <= currentStep |
| 50 | ? 'bg-red-500 text-white' |
| 51 | : 'bg-gray-200 text-white dark:bg-gray-800 dark:text-gray-600' |
| 52 | }`} |
| 53 | animate={{ scale: 1.02 }} |
| 54 | > |
| 55 | {index < currentStep ? ( |
| 56 | <CheckCircle size={17} /> |
| 57 | ) : ( |
| 58 | <Circle size={17} fill="currentColor" /> |
| 59 | )} |
| 60 | </motion.div> |
| 61 | </div> |
| 62 | {index < steps.length - 1 && ( |
| 63 | <div className="relative flex-grow"> |
| 64 | <div className="absolute -top-1 h-1.5 w-full bg-gray-100 dark:bg-gray-800" /> |
| 65 | <motion.div |
| 66 | className="absolute -top-1 h-1.5 w-full bg-red-500" |
| 67 | initial={{ width: '0%' }} |
| 68 | animate={{ |
| 69 | width: index < currentStep ? '100%' : '0%', |
| 70 | }} |
| 71 | transition={{ duration: 0.5, ease: 'easeInOut' }} |
| 72 | /> |
| 73 | </div> |
| 74 | )} |
| 75 | </React.Fragment> |
| 76 | ))} |
| 77 | </div> |
| 78 | </div> |
| 79 | ) |
| 80 | |
| 81 | const StepContent: React.FC = () => { |
| 82 | return ( |
nothing calls this directly
no outgoing calls
no test coverage detected