MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / defaultRenderKey

Function defaultRenderKey

apps/start/src/components/ui/key-value-grid.tsx:43–64  ·  view source on GitHub ↗
(item: KeyValueItem)

Source from the content-addressed store, hash-verified

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 (

Callers 1

KeyValueGridFunction · 0.85

Calls 2

camelCaseToWordsFunction · 0.90
mapMethod · 0.45

Tested by

no test coverage detected