/** * WizardShell — chrome for the multi-step new-project wizard. * * Renders the step indicator (numbered chips with completion * state), the page title for the current step, and the Back/Next * footer. The actual step body is passed in as `children`. * * Keyboard: Enter on the Next button submits; ESC is owned by the * surrounding host (back to landing). */ import React from "react"; import { Check, ChevronLeft, ChevronRight } from "lucide-react"; import { PrimaryButton } from "./ui"; export interface StepDef { key: string; label: string; } export interface WizardShellProps { steps: StepDef[]; activeIndex: number; title: string; subtitle?: string; canGoBack: boolean; canGoNext: boolean; nextLabel?: string; submitting?: boolean; onBack: () => void; onNext: () => void; children: React.ReactNode; } export function WizardShell({ steps, activeIndex, title, subtitle, canGoBack, canGoNext, nextLabel, submitting, onBack, onNext, children, }: WizardShellProps) { // Three-row enterprise layout: stepper + title stay pinned at // the top, footer stays pinned at the bottom, and only the // middle content area scrolls. Follows the Linear / Stripe / // Notion wizard pattern so users never lose the Next button // regardless of viewport height or field length. return (
{subtitle}
}