const COLS = { 1: 'sm:grid-cols-1', 2: 'sm:grid-cols-2', 3: 'sm:grid-cols-3' };
export default function FieldList({ rows, columns = 2 }) {
  return <dl className={`grid gap-x-6 gap-y-3 ${COLS[columns] || COLS[2]}`}>{rows.filter(([, v]) => v !== undefined && v !== null && v !== '').map(([k, v], i) => <div key={i} className="flex flex-col gap-0.5"><dt className="text-xs uppercase tracking-wide text-slate-500">{k}</dt><dd className="text-sm text-slate-200 break-words">{typeof v === 'boolean' ? (v ? 'Yes' : 'No') : v}</dd></div>)}</dl>;
}