import * as React from "react"; import Link from "next/link"; import { ArrowLeft, ArrowRight } from "lucide-react"; import { Badge } from "@/components/ui/badge"; import { cn } from "@/lib/utils"; import { getPrevNext } from "./nav-config"; export type DocStatus = "Stable" | "Beta" | "Coming soon" | "Reference"; const STATUS_VARIANT: Record = { Stable: "success", Beta: "info", "Coming soon": "warning", Reference: "default", }; export function DocPage({ path, eyebrow, title, description, status, children, className, }: { /** Route of this page, e.g. `/docs/fetch`. Used for prev/next links. */ path: string; eyebrow?: string; title: string; description?: React.ReactNode; status?: DocStatus; children: React.ReactNode; className?: string; }) { const { prev, next } = getPrevNext(path); return (
{eyebrow ?? "Documentation"} {status ? ( {status} ) : null}

{title}

{description ?

{description}

: null}
{children}
); }