File tree Expand file tree Collapse file tree 2 files changed +31
-7
lines changed
src/design-system/assets-table Expand file tree Collapse file tree 2 files changed +31
-7
lines changed Original file line number Diff line number Diff line change @@ -5,22 +5,26 @@ import { Text } from '../text';
55
66import * as cx from './assets-table-token-amount.css' ;
77
8+ import type { TypographyVariants } from '../text/text.css' ;
9+
810interface Props {
911 amount : string ;
10- fiatPrice : string ;
12+ details : string ;
13+ detailsColor ?: TypographyVariants [ 'color' ] ;
1114}
1215
1316export const TokenAmount = ( {
1417 amount,
15- fiatPrice,
18+ details,
19+ detailsColor = 'secondary' ,
1620} : Readonly < Props > ) : JSX . Element => {
1721 return (
1822 < Flex flexDirection = "column" alignItems = "flex-end" className = { cx . container } >
1923 < Text . Body . Large weight = "$semibold" data-testid = "token-amount" >
2024 { amount }
2125 </ Text . Body . Large >
22- < Text . Body . Normal color = "secondary" weight = "$semibold " >
23- { fiatPrice }
26+ < Text . Body . Normal color = { detailsColor } weight = "$regular " >
27+ { details }
2428 </ Text . Body . Normal >
2529 </ Flex >
2630 ) ;
Original file line number Diff line number Diff line change @@ -53,7 +53,22 @@ const SimpleAssetInfo = ({ id }: Readonly<AssetInfoProps>): JSX.Element => (
5353 name = "Token name"
5454 description = "Subtitle"
5555 />
56- < TokenAmount amount = "23,584.48" fiatPrice = "24,568.54 USD" />
56+ < TokenAmount amount = "23,584.48" details = "24,568.54 USD" />
57+ </ AssetsTable >
58+ ) ;
59+
60+ const PendingAssetInfo = ( { id } : Readonly < AssetInfoProps > ) : JSX . Element => (
61+ < AssetsTable id = { id } >
62+ < TokenProfile
63+ imageSrc = { cardanoImage }
64+ name = "Token with pending amount"
65+ description = "description"
66+ />
67+ < TokenAmount
68+ amount = "21,584.48"
69+ details = "+ 5 pending"
70+ detailsColor = "success"
71+ />
5772 </ AssetsTable >
5873) ;
5974
@@ -72,7 +87,7 @@ const DetailedAssetInfo = ({
7287 priceChange = "+3.21"
7388 priceTrend = { priceTrend }
7489 />
75- < TokenAmount amount = "23,584.48" fiatPrice = "24,568.54 USD" />
90+ < TokenAmount amount = "23,584.48" details = "24,568.54 USD" />
7691 </ AssetsTable >
7792) ;
7893
@@ -126,6 +141,11 @@ export const Overview = (): JSX.Element => (
126141 < DetailedAssetInfo />
127142 </ Variants . Cell >
128143 </ Variants . Row >
144+ < Variants . Row >
145+ < Variants . Cell >
146+ < PendingAssetInfo />
147+ </ Variants . Cell >
148+ </ Variants . Row >
129149 </ Variants . Table >
130150 </ Section >
131151
@@ -188,7 +208,7 @@ export const Controls: Controls = ({
188208 priceChange = { priceChange }
189209 priceTrend = { priceTrend }
190210 />
191- < TokenAmount amount = { tokenAmount } fiatPrice = { fiatPrice } />
211+ < TokenAmount amount = { tokenAmount } details = { fiatPrice } />
192212 </ AssetsTable >
193213 </ Flex >
194214 </ Section >
You can’t perform that action at this time.
0 commit comments