MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / FlowStep

Function FlowStep

apps/public/src/components/flow-step.tsx:37–79  ·  view source on GitHub ↗
({
  step,
  actor,
  description,
  children,
  icon = 'visitor',
  isLast = false,
}: FlowStepProps)

Source from the content-addressed store, hash-verified

35};
36
37export function FlowStep({
38 step,
39 actor,
40 description,
41 children,
42 icon = 'visitor',
43 isLast = false,
44}: FlowStepProps) {
45 const Icon = iconMap[icon];
46
47 return (
48 <div className="relative flex gap-4 mb-4 min-w-0">
49 {/* Step number and icon */}
50 <div className="flex flex-col items-center shrink-0">
51 <div className="relative z-10 bg-background">
52 <div className="flex items-center justify-center size-10 rounded-full bg-primary text-primary-foreground font-semibold text-sm shadow-sm">
53 {step}
54 </div>
55 <div
56 className={`absolute -bottom-2 -right-2 flex items-center justify-center w-6 h-6 rounded-full bg-background border shadow-sm ${iconBorderColorMap[icon] || 'border-primary'}`}
57 >
58 <Icon
59 className={`size-3.5 ${iconColorMap[icon] || 'text-primary'}`}
60 />
61 </div>
62 </div>
63 {/* Connector line - extends from badge through content to next step */}
64 {!isLast && (
65 <div className="w-0.5 bg-border mt-2 flex-1 min-h-[2rem]" />
66 )}
67 </div>
68
69 {/* Content */}
70 <div className="flex-1 pt-1 min-w-0">
71 <div className="mb-2">
72 <span className="font-semibold text-foreground mr-2">{actor}:</span>{' '}
73 <span className="text-muted-foreground">{description}</span>
74 </div>
75 {children && <div className="mt-3 min-w-0">{children}</div>}
76 </div>
77 </div>
78 );
79}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected