Download src/components/features/chat/tool-visualizers/primitives/key-value-grid.tsx from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 619 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/chat/tool-visualizers/primitives/key-value-grid.tsx
- Command line
-
hf download hf://SaylorTwift/openhands/src/components/features/chat/tool-visualizers/primitives/key-value-grid.tsx
-
curl -L -o key-value-grid.tsx https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/chat/tool-visualizers/primitives/key-value-grid.tsx
619 Bytes
| 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> | |
| ); | |
| } | |