File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
src/design-system/assets-table Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import React from 'react';
33import { Flex } from '../flex' ;
44import { Text } from '../text' ;
55import { FontWeights } from '../text/create-text.util' ;
6+ import { Tooltip } from '../tooltip' ;
67
78import * as cx from './assets-table-token-amount.css' ;
89
@@ -13,21 +14,27 @@ interface Props {
1314 details : string ;
1415 detailsColor ?: TypographyVariants [ 'color' ] ;
1516 detailsWeight ?: FontWeights ;
17+ detailsTooltip ?: string ;
1618}
1719
1820export const TokenAmount = ( {
1921 amount,
2022 details,
2123 detailsColor = 'secondary' ,
2224 detailsWeight = '$regular' ,
25+ detailsTooltip,
2326} : Readonly < Props > ) : JSX . Element => {
2427 return (
2528 < Flex flexDirection = "column" alignItems = "flex-end" className = { cx . container } >
2629 < Text . Body . Large weight = "$semibold" data-testid = "token-amount" >
2730 { amount }
2831 </ Text . Body . Large >
2932 < Text . Body . Normal color = { detailsColor } weight = { detailsWeight } >
30- { details }
33+ { detailsTooltip ? (
34+ < Tooltip label = { detailsTooltip } > { details } </ Tooltip >
35+ ) : (
36+ details
37+ ) }
3138 </ Text . Body . Normal >
3239 </ Flex >
3340 ) ;
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ const PendingAssetInfo = ({ id }: Readonly<AssetInfoProps>): JSX.Element => (
6868 amount = "21,584.48"
6969 details = "+ 5 pending"
7070 detailsColor = "success"
71+ detailsTooltip = "Pending coins represent tokens that the wallet recognizes but are not yet finalized by the network. These coins are currently unspendable until confirmed."
7172 />
7273 </ AssetsTable >
7374) ;
You can’t perform that action at this time.
0 commit comments