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

Function KeyValue

apps/start/src/components/ui/key-value.tsx:11–34  ·  view source on GitHub ↗
({ href, onClick, name, value }: KeyValueProps)

Source from the content-addressed store, hash-verified

9}
10
11export function KeyValue({ href, onClick, name, value }: KeyValueProps) {
12 const clickable = href || onClick;
13 const Component = (href ? Link : onClick ? 'button' : 'div') as 'button';
14
15 return (
16 <Component
17 className={cn(
18 'group flex min-w-0 max-w-full divide-x self-start overflow-hidden rounded-md border border-border text-sm font-medium transition-transform',
19 clickable && 'hover:-translate-y-0.5',
20 )}
21 {...{ href, onClick }}
22 >
23 <div className="bg-black/5 p-1 px-2 capitalize">{name}</div>
24 <div
25 className={cn(
26 'font-mono overflow-hidden max-w-[300px] text-ellipsis whitespace-nowrap bg-card p-1 px-2 text-highlight',
27 clickable && 'group-hover:underline',
28 )}
29 >
30 {value}
31 </div>
32 </Component>
33 );
34}

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected