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