Skip to content

Commit e36871e

Browse files
authored
Add new images to harmony for Wallet UI (#11925)
1 parent 01111ae commit e36871e

File tree

10 files changed

+57
-38
lines changed

10 files changed

+57
-38
lines changed
118 KB
Loading
297 KB
Loading
Lines changed: 6 additions & 3 deletions
Loading

packages/harmony/src/icons/logos.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import IconAudiusLogoHorizontalColorSVG from '../assets/icons/AudiusLogoHorizont
77
import IconAudiusLogoHorizontalColorNewSVG from '../assets/icons/AudiusLogoHorizontalColorNew.svg'
88
import IconAudiusLogoHorizontalNewSVG from '../assets/icons/AudiusLogoHorizontalNew.svg'
99
import IconAudiusLogoVerticalSVG from '../assets/icons/AudiusLogoVertical.svg'
10+
import IconLogoWhiteBackgroundPng from '../assets/icons/AudiusLogoWhiteBg.png'
1011
import IconLogoCoinbaseSVG from '../assets/icons/Coinbase.svg'
1112
import IconLogoCoinbasePaySVG from '../assets/icons/CoinbasePay.svg'
1213
import IconDiscordSVG from '../assets/icons/Discord.svg'
@@ -57,6 +58,9 @@ export const IconLogoCircleSTR = IconLogoCircleSTRSVG as IconComponent
5758
export const IconLogoCircleUSD = IconLogoCircleUSDSVG as IconComponent
5859
export const IconLogoCircleUSDC = IconLogoCircleUSDCSVG as IconComponent
5960
export const IconLogoCircleUSDCPng = createImageIcon(LogoCircleUSDCPng)
61+
export const IconLogoWhiteBackground = createImageIcon(
62+
IconLogoWhiteBackgroundPng
63+
)
6064
export const IconPhantom = IconPhantomSVG as IconComponent
6165
export const IconPhantomPlain = IconPhantomPlainSVG as IconComponent
6266
export const IconSolana = IconSolanaSVG as IconComponent

packages/harmony/src/icons/specialIcons.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import IconCosignSVG from '../assets/icons/Cosign.svg'
66
import IconMultiselectAddSVG from '../assets/icons/MultiselectAdd.svg'
77
import IconMultiselectRemoveSVG from '../assets/icons/MultiselectRemove.svg'
88
// Token Tier Badges
9+
import TokenAUDIOPng from '../assets/icons/TokenAUDIO.png'
910
import TokenBronzePng from '../assets/icons/TokenBronze.png'
1011
import TokenGoldPng from '../assets/icons/TokenGold.png'
1112
import TokenNoTierPng from '../assets/icons/TokenNoTier.png'
@@ -148,3 +149,6 @@ export const IconPlaybackRate1_5x = IconPlaybackRate1_5xSVG as IconComponent
148149
export const IconPlaybackRate2x = IconPlaybackRate2xSVG as IconComponent
149150
export const IconPlaybackRate2_5x = IconPlaybackRate2_5xSVG as IconComponent
150151
export const IconPlaybackRate3x = IconPlaybackRate3xSVG as IconComponent
152+
153+
// Token Icons
154+
export const IconTokenAUDIO = createImageIcon(TokenAUDIOPng)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import IconTokenAUDIOPng from '@audius/harmony/src/assets/icons/TokenAUDIO.png'
2+
import type { ImageProps } from 'react-native'
3+
import { Image } from 'react-native'
4+
5+
import { iconSizes, type IconSize } from '../foundations'
6+
7+
type Props = Omit<ImageProps, 'source'> & {
8+
size?: IconSize
9+
}
10+
11+
export const IconTokenAUDIO = ({ size = 'm', style, ...props }: Props) => (
12+
<Image
13+
source={IconTokenAUDIOPng}
14+
style={[
15+
{
16+
width: iconSizes[size],
17+
height: iconSizes[size]
18+
},
19+
style
20+
]}
21+
{...props}
22+
/>
23+
)

packages/mobile/src/harmony-native/icons.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ export { IconTokenPlatinum } from './components/IconTokenPlatinum'
176176
export { IconTokenSilver } from './components/IconTokenSilver'
177177
export { IconTokenGold } from './components/IconTokenGold'
178178
export { IconTokenNoTier } from './components/IconTokenNoTier'
179+
export { IconTokenAUDIO } from './components/IconTokenAUDIO'
179180

180181
// File Types
181182
export { default as IconFile3GA } from '@audius/harmony/src/assets/icons/file3GA.svg'

packages/mobile/src/screens/wallet-screen/components/YourCoins.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import { walletMessages } from '@audius/common/messages'
66
import {
77
Flex,
88
IconCaretRight,
9-
IconLogoCircle,
9+
IconTokenAUDIO,
1010
Paper,
11-
Text
11+
Text,
12+
cornerRadius
1213
} from '@audius/harmony-native'
1314
import { useNavigation } from 'app/hooks/useNavigation'
1415

@@ -39,7 +40,7 @@ export const YourCoins = () => {
3940
alignItems='center'
4041
>
4142
<Flex direction='row' alignItems='center' gap='m'>
42-
<IconLogoCircle size='4xl' />
43+
<IconTokenAUDIO size='4xl' borderRadius={cornerRadius.circle} />
4344
<Flex direction='column' gap='xs'>
4445
<Flex direction='row' alignItems='center' gap='xs'>
4546
<Text variant='heading' size='l' color='default'>

packages/web/src/components/payout-wallet-display/PayoutWalletDisplay.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { accountSelectors } from '@audius/common/store'
33
import { shortenSPLAddress } from '@audius/common/utils'
44
import {
55
Flex,
6-
IconLogoCircle,
76
IconLogoCircleSOL,
7+
IconLogoWhiteBackground,
88
Skeleton,
99
Text
1010
} from '@audius/harmony'
@@ -50,7 +50,10 @@ export const PayoutWalletDisplay = () => {
5050

5151
const isExternalWallet = !!payoutWallet
5252

53-
const IconComponent = isExternalWallet ? IconLogoCircleSOL : IconLogoCircle
53+
const IconComponent = isExternalWallet
54+
? IconLogoCircleSOL
55+
: IconLogoWhiteBackground
56+
5457
const displayText = isExternalWallet
5558
? shortenSPLAddress(displayAddress ?? '') // shorten the owner address or the stored address
5659
: messages.builtInWallet

packages/web/src/pages/pay-and-earn-page/components/YourCoins.tsx

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ import { route } from '@audius/common/utils'
66
import {
77
Flex,
88
IconCaretRight,
9-
IconLogoCircle,
9+
IconTokenAUDIO,
1010
Paper,
1111
Text,
12-
useTheme
12+
useTheme,
13+
useMedia
1314
} from '@audius/harmony'
1415
import { useDispatch } from 'react-redux'
1516
import { push } from 'redux-first-history'
@@ -19,7 +20,8 @@ const { WALLET_AUDIO_PAGE } = route
1920

2021
export const YourCoins = () => {
2122
const dispatch = useDispatch()
22-
const { color, spacing } = useTheme()
23+
const { color, spacing, cornerRadius } = useTheme()
24+
const { isMobile, isExtraSmall } = useMedia()
2325

2426
const {
2527
audioBalanceFormatted,
@@ -46,48 +48,26 @@ export const YourCoins = () => {
4648
<Flex
4749
alignItems='center'
4850
justifyContent='space-between'
49-
p='xl'
51+
p={isMobile ? spacing.l : spacing.xl}
5052
alignSelf='stretch'
5153
onClick={handleTokenClick}
5254
css={{
5355
cursor: 'pointer',
5456
'&:hover': {
5557
backgroundColor: color.background.surface2
56-
},
57-
'@media (max-width: 768px)': {
58-
padding: spacing.l
5958
}
6059
}}
6160
>
62-
<Flex
63-
alignItems='center'
64-
gap='l'
65-
css={{
66-
'@media (max-width: 480px)': {
67-
gap: spacing.m
68-
}
69-
}}
70-
>
71-
<IconLogoCircle
61+
<Flex alignItems='center' gap={isExtraSmall ? 'm' : 'l'}>
62+
<IconTokenAUDIO
7263
width={DIMENSIONS}
7364
height={DIMENSIONS}
7465
css={{
75-
'@media (max-width: 480px)': {
76-
width: '48px',
77-
height: '48px'
78-
}
66+
borderRadius: cornerRadius.circle
7967
}}
8068
/>
8169
<Flex direction='column' gap='xs'>
82-
<Flex
83-
gap='xs'
84-
css={{
85-
'@media (max-width: 480px)': {
86-
flexDirection: 'column',
87-
gap: '0'
88-
}
89-
}}
90-
>
70+
<Flex gap='xs'>
9171
<Text variant='heading' size='l' color='default'>
9272
{displayAmount}
9373
</Text>

0 commit comments

Comments
 (0)