({
source,
target,
volume,
x,
y,
}: TransactionTooltipProps)
| 11 | } |
| 12 | |
| 13 | const TransactionTooltip: FC<TransactionTooltipProps> = ({ |
| 14 | source, |
| 15 | target, |
| 16 | volume, |
| 17 | x, |
| 18 | y, |
| 19 | }: TransactionTooltipProps) => { |
| 20 | return ( |
| 21 | <div |
| 22 | className="fixed z-50 flex h-fit w-fit -translate-x-full transform-gpu flex-col items-center gap-y-1 divide-y divide-gray-600/20 rounded-lg bg-gray-50/50 p-3 ring-1 ring-gray-600/20 backdrop-blur-md" |
| 23 | style={{ |
| 24 | left: x + 10, |
| 25 | top: y + 10, |
| 26 | }} |
| 27 | > |
| 28 | <div> |
| 29 | <span className="flex h-full w-full flex-row items-center justify-center gap-x-2"> |
| 30 | <h3 className="font-mono text-xs font-medium text-gray-400"> |
| 31 | {source.slice(0, 5)}...{source.slice(-5)} |
| 32 | </h3> |
| 33 | <ArrowRightIcon className="h-5 w-5 text-gray-400" /> |
| 34 | <h3 className="font-mono text-xs font-medium text-gray-400"> |
| 35 | {target.slice(0, 5)}...{target.slice(-5)} |
| 36 | </h3> |
| 37 | </span> |
| 38 | <h1 className=" w-full text-center text-lg font-bold text-gray-600"> |
| 39 | {formatNumber(volume)} |
| 40 | </h1> |
| 41 | </div> |
| 42 | |
| 43 | <h1 className="flex w-full flex-row justify-center gap-x-1 pt-1 text-center text-xs font-medium text-gray-400"> |
| 44 | Click edge to{" "} |
| 45 | <a className="font-bold text-gray-500">view transactions</a> |
| 46 | <BarsArrowDownIcon className="mt-0.5 inline-block h-4 w-4 text-gray-500" /> |
| 47 | </h1> |
| 48 | </div> |
| 49 | ); |
| 50 | }; |
| 51 | |
| 52 | export default TransactionTooltip; |
| 53 | export type { TransactionTooltipProps }; |
nothing calls this directly
no test coverage detected