diff --git a/src/design-system/profile-dropdown/profile-dropdown-wallet-card.component.tsx b/src/design-system/profile-dropdown/profile-dropdown-wallet-card.component.tsx index 04deb7d..f8b2137 100644 --- a/src/design-system/profile-dropdown/profile-dropdown-wallet-card.component.tsx +++ b/src/design-system/profile-dropdown/profile-dropdown-wallet-card.component.tsx @@ -67,16 +67,24 @@ export const WalletCard = ({ return ( - {profile ? ( - getProfileImage(profile, testId) - ) : ( - - )} + + {profile ? ( + getProfileImage(profile, testId) + ) : ( + + )} + {subtitle ? ( - - - {title.text} - + + + + {title.text} + + ) : ( - + - - - - {onOpenEditWallet && ( - - { - onOpenEditWallet?.(); - event.stopPropagation(); - }} - icon={} - size="extraSmall" - as="div" - testId="wallet-option-edit-wallet-button" - /> - - )} - {type !== 'shared' && onOpenAccountsMenu && ( - - { - onOpenAccountsMenu?.(); - event.stopPropagation(); - }} - icon={} - size="extraSmall" - as="div" - testId="wallet-option-accounts-menu-button" - /> - - )} - + + + + + + + {onOpenEditWallet && ( + + { + onOpenEditWallet?.(); + event.stopPropagation(); + }} + icon={} + size="extraSmall" + as="div" + testId="wallet-option-edit-wallet-button" + /> + + )} + {type !== 'shared' && onOpenAccountsMenu && ( + + { + onOpenAccountsMenu?.(); + event.stopPropagation(); + }} + icon={} + size="extraSmall" + as="div" + testId="wallet-option-accounts-menu-button" + /> + + )} + + ); diff --git a/src/design-system/profile-dropdown/profile-dropdown-wallet-option.css.ts b/src/design-system/profile-dropdown/profile-dropdown-wallet-option.css.ts index ce6de90..1b7f4fa 100644 --- a/src/design-system/profile-dropdown/profile-dropdown-wallet-option.css.ts +++ b/src/design-system/profile-dropdown/profile-dropdown-wallet-option.css.ts @@ -2,6 +2,15 @@ import { sx, style, vars } from '../../design-tokens'; export const button = style({}); +export const walletCard = style({ + flex: '1', // make sure the title etc uses all available space + minWidth: 0, // make sure it doesn't overflow width +}); + +export const walletActions = style({ + flex: '0', // wallet action buttons should take up as little space as possible +}); + export const container = style([ sx({ height: '$48', diff --git a/src/design-system/profile-dropdown/profile-dropdown-wallet-option.stories.tsx b/src/design-system/profile-dropdown/profile-dropdown-wallet-option.stories.tsx index fd6e7cd..e38adfc 100644 --- a/src/design-system/profile-dropdown/profile-dropdown-wallet-option.stories.tsx +++ b/src/design-system/profile-dropdown/profile-dropdown-wallet-option.stories.tsx @@ -66,15 +66,14 @@ export const Overview = (): JSX.Element => ( @@ -109,8 +108,7 @@ export const Overview = (): JSX.Element => (