import { For, Show, createSignal } from "solid-js"; import { Modal } from "./Modal"; import { IconCheck } from "./Icons"; interface OnboardingModalProps { isOpen: boolean; projectName: string; onClose: () => void; } const steps = [ { title: "Welcome aboard", body: (projectName: string) => `${projectName} is ready. Three things worth doing first:`, list: [ "Create an API key in Settings", "Create a storage bucket for files", "Invite teammates from Members", ], }, { title: "Authenticate requests", body: () => "Every API call needs either a session JWT (this console uses it) or an X-API-Key header scoped to the project. Keys are shown once — store them like passwords.", }, { title: "Wire up your app", body: () => "Point your client at /api/v1 on this host. The OpenAPI spec is served at /api/v1/openapi.yaml — regenerate the TypeScript client with `npm run generate:client`.", }, ]; export function OnboardingModal(props: OnboardingModalProps) { const [step, setStep] = createSignal(0); const handleClose = () => { setStep(0); props.onClose(); }; return (
{/* step indicator */}
{(_, i) => (
)}

{steps[step()].title}

{steps[step()].body(props.projectName)}

    {(item) => (
  • {item}
  • )}
0}>
); }