Skip to content

Commit 99d5454

Browse files
authored
Merge pull request #486 from 0xsend/mvp
mvp
2 parents 9d3b5f0 + 6bafb58 commit 99d5454

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

packages/app/features/home/TokenBalanceCard.tsx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
XStack,
88
YStack,
99
Stack,
10+
BigHeading,
1011
styled,
1112
} from '@my/ui'
1213
import formatAmount from 'app/utils/formatAmount'
@@ -53,15 +54,28 @@ export const TokenBalanceCard = () => {
5354
{totalBalance === undefined ? (
5455
<Spinner size={'large'} />
5556
) : (
56-
<Paragraph
57-
fontFamily={'$mono'}
57+
<BigHeading
58+
$platform-web={{ width: 'fit-content' }}
59+
$sm={{
60+
fontSize: (() => {
61+
switch (true) {
62+
case formattedBalance.length > 8:
63+
return '$11'
64+
case formattedBalance.length > 5:
65+
return '$12'
66+
default:
67+
return 96
68+
}
69+
})(),
70+
}}
5871
fontSize={96}
5972
lineHeight={'$15'}
6073
fontWeight={'500'}
74+
color={'$color12'}
6175
zIndex={1}
6276
>
63-
{formatAmount(totalBalance, 4, 0)}
64-
</Paragraph>
77+
{formattedBalance}
78+
</BigHeading>
6579
)}
6680
<Paragraph fontSize={'$6'} fontWeight={'500'} zIndex={1}>
6781
{'USD'}

packages/app/features/home/__snapshots__/screen.test.tsx.snap

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,20 @@ exports[`HomeScreen 1`] = `
299299
}
300300
>
301301
<Text
302+
accessibilityRole="header"
302303
selectable={true}
303304
style={
304305
{
305306
"color": "#FFFFFF",
306307
"fontFamily": "System",
307308
"fontSize": 96,
308-
"fontWeight": "500",
309-
"lineHeight": 119,
309+
"fontWeight": "700",
310+
"lineHeight": 118,
311+
"marginBottom": 0,
312+
"marginLeft": 0,
313+
"marginRight": 0,
314+
"marginTop": 0,
315+
"textTransform": "none",
310316
"zIndex": 1,
311317
}
312318
}

0 commit comments

Comments
 (0)