MCPcopy Create free account
hub / github.com/SyntaxUI/syntaxui / StepIndicator

Function StepIndicator

src/showcase/components/stepper/CheckedStepper.tsx:38–62  ·  view source on GitHub ↗
({
  currentStep,
  steps,
})

Source from the content-addressed store, hash-verified

36]
37
38const StepIndicator: React.FC<{ currentStep: number; steps: StepProps[] }> = ({
39 currentStep,
40 steps,
41}) => (
42 <div className="flex justify-between">
43 {steps.map((step, index) => (
44 <div key={step.label} className="flex flex-col items-center">
45 <motion.div
46 className={`flex h-10 w-10 items-center justify-center rounded-full ${
47 index <= currentStep ? 'bg-red-500/15 text-red-500' : 'bg-secondary'
48 }`}
49 initial={false}
50 animate={{ scale: index === currentStep ? 1.2 : 1 }}
51 >
52 {index <= currentStep ? (
53 <CheckCircle size={20} />
54 ) : (
55 <Circle size={20} />
56 )}
57 </motion.div>
58 <div className="mt-2 text-sm">{step.label}</div>
59 </div>
60 ))}
61 </div>
62)
63
64const ProgressBar: React.FC<{ currentStep: number; totalSteps: number }> = ({
65 currentStep,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected