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

Function DataTile

packages/shared/src/components/DataTile.tsx:22–59  ·  view source on GitHub ↗
({
  label,
  value,
  info,
  icon,
  subtitle,
  valueClassName,
  className,
})

Source from the content-addressed store, hash-verified

20}
21
22export const DataTile: React.FC<DataTileProps> = ({
23 label,
24 value,
25 info,
26 icon,
27 subtitle,
28 valueClassName,
29 className,
30}) => {
31 return (
32 <div
33 className={classNames(
34 'flex flex-col gap-1 rounded-14 border border-border-subtlest-tertiary p-4',
35 className?.container,
36 )}
37 >
38 <span className="flex flex-row items-center gap-1">
39 <Typography type={TypographyType.Footnote}>{label}</Typography>
40 <Tooltip content={info} enableMobileClick>
41 <span className="text-text-disabled">
42 <InfoIcon size={IconSize.Size16} />
43 </span>
44 </Tooltip>
45 </span>
46 <span className="flex min-w-0 flex-row items-center gap-1">
47 {icon}
48 <Typography
49 type={TypographyType.Title2}
50 bold
51 className={classNames('min-w-0', valueClassName)}
52 >
53 {typeof value === 'number' ? formatDataTileValue(value) : value}
54 </Typography>
55 </span>
56 {subtitle}
57 </div>
58 );
59};

Callers

nothing calls this directly

Calls 1

formatDataTileValueFunction · 0.90

Tested by

no test coverage detected