initial commit after split
This commit is contained in:
19
webui/src/components/Stepper.tsx
Normal file
19
webui/src/components/Stepper.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { WizardStep } from "../types";
|
||||
|
||||
export default function Stepper({ steps, activeStep, onSelect }: { steps: WizardStep[]; activeStep: string; onSelect: (id: string) => void }) {
|
||||
return (
|
||||
<ol className="stepper">
|
||||
{steps.map((step, index) => (
|
||||
<li key={step.id} className={`step ${activeStep === step.id ? "active" : ""} step-${step.status || "todo"}`}>
|
||||
<button onClick={() => onSelect(step.id)}>
|
||||
<span className="step-number">{index + 1}</span>
|
||||
<span>
|
||||
<strong>{step.label}</strong>
|
||||
{step.description && <small>{step.description}</small>}
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user