File size: 619 Bytes
3201ca6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import React from "react";

interface KeyValueRow {
  /** Already-translated label. */
  label: string;
  value: React.ReactNode;
}

/**
 * Two-column label / value grid for compact parameter displays.
 */
export function KeyValueGrid({ rows }: { rows: KeyValueRow[] }) {
  return (
    <div className="grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs">
      {rows.map(({ label, value }) => (
        <React.Fragment key={label}>
          <span className="text-muted">{label}</span>
          <span className="break-all font-mono text-foreground">{value}</span>
        </React.Fragment>
      ))}
    </div>
  );
}