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';
3
3
import { Flex } from '../flex' ;
4
4
import { Text } from '../text' ;
5
5
import { FontWeights } from '../text/create-text.util' ;
6
+ import { Tooltip } from '../tooltip' ;
6
7
7
8
import * as cx from './assets-table-token-amount.css' ;
8
9
@@ -13,21 +14,27 @@ interface Props {
13
14
details : string ;
14
15
detailsColor ?: TypographyVariants [ 'color' ] ;
15
16
detailsWeight ?: FontWeights ;
17
+ detailsTooltip ?: string ;
16
18
}
17
19
18
20
export const TokenAmount = ( {
19
21
amount,
20
22
details,
21
23
detailsColor = 'secondary' ,
22
24
detailsWeight = '$regular' ,
25
+ detailsTooltip,
23
26
} : Readonly < Props > ) : JSX . Element => {
24
27
return (
25
28
< Flex flexDirection = "column" alignItems = "flex-end" className = { cx . container } >
26
29
< Text . Body . Large weight = "$semibold" data-testid = "token-amount" >
27
30
{ amount }
28
31
</ Text . Body . Large >
29
32
< Text . Body . Normal color = { detailsColor } weight = { detailsWeight } >
30
- { details }
33
+ { detailsTooltip ? (
34
+ < Tooltip label = { detailsTooltip } > { details } </ Tooltip >
35
+ ) : (
36
+ details
37
+ ) }
31
38
</ Text . Body . Normal >
32
39
</ Flex >
33
40
) ;
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ const PendingAssetInfo = ({ id }: Readonly<AssetInfoProps>): JSX.Element => (
68
68
amount = "21,584.48"
69
69
details = "+ 5 pending"
70
70
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."
71
72
/>
72
73
</ AssetsTable >
73
74
) ;
You can’t perform that action at this time.
0 commit comments