import type { ReactNode } from "react"; export type DetailRow = { label: string; value?: string | ReactNode; }; function MultilineValue({ value }: { value: string }) { const lines = value.split(" | "); if (lines.length === 1) return <>{value}>; return ( {lines.map((line, i) => ( {line} ))} ); } export function DetailTable({ rows }: { rows: DetailRow[] }) { const filtered = rows.filter((row) => row.value); if (filtered.length === 0) return null; return (
| {row.label} |
{typeof row.value === "string" ? |