(item: KeyValueItem)
| 41 | copyable = false, |
| 42 | }: KeyValueGridProps) { |
| 43 | const defaultRenderKey = (item: KeyValueItem) => { |
| 44 | const splitKey = item.name.split('.'); |
| 45 | return ( |
| 46 | <div className="flex items-center gap-1"> |
| 47 | {splitKey.map((name, index) => ( |
| 48 | <span |
| 49 | key={name} |
| 50 | className={ |
| 51 | index === splitKey.length - 1 |
| 52 | ? 'text-foreground' |
| 53 | : 'text-muted-foreground' |
| 54 | } |
| 55 | > |
| 56 | {camelCaseToWords(name)} |
| 57 | {index < splitKey.length - 1 && ( |
| 58 | <span className="text-muted-foreground">.</span> |
| 59 | )} |
| 60 | </span> |
| 61 | ))} |
| 62 | </div> |
| 63 | ); |
| 64 | }; |
| 65 | |
| 66 | const defaultRenderValue = (item: KeyValueItem) => { |
| 67 | return ( |
no test coverage detected