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

Function StatsCard

apps/start/src/components/stats.tsx:20–62  ·  view source on GitHub ↗
({
  title,
  value,
  enhancer,
  className,
  size = 'default',
}: {
  title: string;
  value: React.ReactNode;
  enhancer?: React.ReactNode;
  className?: string;
  size?: 'default' | 'sm';
})

Source from the content-addressed store, hash-verified

18}
19
20export function StatsCard({
21 title,
22 value,
23 enhancer,
24 className,
25 size = 'default',
26}: {
27 title: string;
28 value: React.ReactNode;
29 enhancer?: React.ReactNode;
30 className?: string;
31 size?: 'default' | 'sm';
32}) {
33 return (
34 <div
35 className={cn(
36 'col ring-[0.5px] ring-border',
37 size === 'sm' ? 'gap-1 p-3' : 'gap-2 p-4',
38 className,
39 )}
40 >
41 <div
42 className={cn(
43 'text-muted-foreground',
44 size === 'sm' ? 'text-xs' : 'text-sm',
45 )}
46 >
47 {title}
48 </div>
49 <div className="row justify-between gap-4">
50 <div
51 className={cn(
52 'font-mono leading-snug',
53 size === 'sm' ? 'text-sm font-medium' : 'text-lg font-bold',
54 )}
55 >
56 {value}
57 </div>
58 <div>{enhancer}</div>
59 </div>
60 </div>
61 );
62}

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected