import type { ReactNode } from 'react'; export type Step = string | { title: ReactNode; detail?: ReactNode; files?: string[] }; /** * Ordered implementation steps. Pass plain strings for simple lists, or * objects with `title` / `detail` / `files` to name the real files touched. */ export function Steps({ items }: { items: Step[] }) { return (
    {items.map((raw, i) => { const item = typeof raw === 'string' ? { title: raw } : raw; return (
  1. {i + 1}
    {item.title}
    {item.detail &&
    {item.detail}
    } {item.files?.length ? (
    {item.files.map((f) => {f})}
    ) : null}
  2. ); })}
); }