MCPcopy Create free account
hub / github.com/dailydotdev/apps / MetricCell

Function MetricCell

packages/shared/src/features/boost/BoostManager.tsx:103–134  ·  view source on GitHub ↗
({
  label,
  info,
  value,
  icon,
  isLoading,
}: {
  label: string;
  info: string;
  value: string | null;
  icon?: ReactNode;
  isLoading: boolean;
})

Source from the content-addressed store, hash-verified

101);
102
103const MetricCell = ({
104 label,
105 info,
106 value,
107 icon,
108 isLoading,
109}: {
110 label: string;
111 info: string;
112 value: string | null;
113 icon?: ReactNode;
114 isLoading: boolean;
115}): ReactElement => (
116 <div className="flex min-w-36 flex-1 shrink-0 snap-start flex-col gap-1 bg-background-default px-4 py-3 tablet:min-w-0 tablet:px-6">
117 <span className="flex items-center gap-1 text-text-tertiary typo-footnote">
118 <span className="truncate">{label}</span>
119 <Tooltip content={info} enableMobileClick>
120 <span className="text-text-disabled">
121 <InfoIcon size={IconSize.Size16} />
122 </span>
123 </Tooltip>
124 </span>
125 {isLoading ? (
126 <ElementPlaceholder className="my-1 h-5 w-16 rounded-6" />
127 ) : (
128 <span className="flex items-center gap-1 font-bold tabular-nums typo-title3">
129 {icon}
130 {value}
131 </span>
132 )}
133 </div>
134);
135
136type ScrollSide = 'before' | 'after';
137

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected