MCPcopy Create free account
hub / github.com/WardAnalytics/WardGraph / ProgressCircles

Function ProgressCircles

src/components/graph/tutorial/TutorialDialog.tsx:60–89  ·  view source on GitHub ↗
({
  currentStep,
  totalSteps,
  setCurrentStep,
})

Source from the content-addressed store, hash-verified

58}
59
60const ProgressCircles: FC<ProgressCirclesProps> = ({
61 currentStep,
62 totalSteps,
63 setCurrentStep,
64}) => {
65 // Number of circles to show at a time
66 const maxVisibleCircles = 8;
67
68 // Start index of the circles to show
69 const start = Math.max(0, currentStep - Math.floor(maxVisibleCircles / 2));
70
71 return (
72 <div className="flex flex-row items-center justify-center gap-x-2">
73 {Array.from(Array(maxVisibleCircles).keys()).map((index) => {
74 const step = start + index;
75 // TODO: Add slide transition to the progress circles, like a carousel
76 return (
77 step < totalSteps && (
78 <ProgressCircle
79 key={step}
80 isCompleted={step < currentStep}
81 isCurrent={step === currentStep}
82 onClick={() => setCurrentStep(step)}
83 />
84 )
85 );
86 })}
87 </div>
88 );
89};
90
91const TutorialDialog: FC<TutorialProps> = ({
92 show: isTutorialOpen,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected