Skip to content

Commit

Permalink
feat: balance tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
heisenberg-2077 committed Sep 21, 2023
1 parent 5e95b6f commit 56f1654
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { SWAP_SUPPORT_CHAINS } from '@/constant';
import { CustomizedButton } from './CustomizedButton';
import { BlockedButton } from './BlockedButton';
import { useRabbySelector } from '@/ui/store';
import { TooltipWithMagnetArrow } from '@/ui/component/Tooltip/TooltipWithMagnetArrow';

const PAGE_COUNT = 10;
const ellipsis = (text: string) => {
Expand Down Expand Up @@ -228,12 +229,15 @@ const TokenDetail = ({
{getTokenSymbol(token)} {t('page.newAddress.hd.balance')}
</div>
<div className="balance-content overflow-hidden">
<div
className="balance-value truncate"
<TooltipWithMagnetArrow
className="rectangle w-[max-content]"
title={(tokenWithAmount.amount || 0).toString()}
placement="bottom"
>
{splitNumberByStep((tokenWithAmount.amount || 0)?.toFixed(8))}
</div>
<div className="balance-value truncate">
{splitNumberByStep((tokenWithAmount.amount || 0)?.toFixed(8))}
</div>
</TooltipWithMagnetArrow>
<div
className="balance-value-usd truncate"
title={(tokenWithAmount.amount * token.price || 0).toString()}
Expand Down

0 comments on commit 56f1654

Please sign in to comment.