import * as React from "react"; import { cn } from "@/lib/utils"; export interface ParamRow { name: string; type: string; /** Rendered in monospace. Omit for "—". */ default?: string; required?: boolean; /** Free-form description; may contain inline components. */ description: React.ReactNode; /** Small note under the type, e.g. constraints. */ constraints?: string; /** Marks a field the validator accepts but the platform does not act on yet. */ reserved?: boolean; } export function ParamTable({ rows, className, caption, showDefault = true }: { rows: ParamRow[]; className?: string; caption?: string; showDefault?: boolean }) { return (
{caption ? : null} {showDefault ? : null} {rows.map((r) => ( {showDefault ? : null} ))}
{caption}
Field TypeDefaultDescription
{r.name} {r.required ? ( required ) : null} {r.reserved ? ( reserved ) : null} {r.type} {r.constraints ?
{r.constraints}
: null}
{r.default ?? —}{r.description}
); }