Skip to content

Commit

Permalink
more badge sizing fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
walmat committed Dec 16, 2024
1 parent ef79118 commit e9f7542
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/__swaps__/screens/Swap/components/ReviewPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ export function ReviewPanel() {

<Inline alignVertical="center" horizontalSpace="6px" wrap={false}>
<View style={sx.chainBadgeContainer}>
<AnimatedChainImage showMainnetBadge assetType="input" size={16} />
<AnimatedChainImage showMainnetBadge assetType="input" size={24} />
</View>
<AnimatedText
align="right"
Expand Down Expand Up @@ -385,7 +385,7 @@ export function ReviewPanel() {
<Stack space="10px">
<Inline alignVertical="center" horizontalSpace="6px" wrap={false}>
<View style={sx.chainBadgeContainer}>
<AnimatedChainImage showMainnetBadge assetType="input" size={16} />
<AnimatedChainImage showMainnetBadge assetType="input" size={24} />
</View>
<UnmountOnAnimatedReaction
isMountedWorklet={() => {
Expand Down Expand Up @@ -434,7 +434,7 @@ const sx = StyleSheet.create({
height: 8,
left: 8,
justifyContent: 'center',
top: 4,
width: 16,
top: 8,
width: 20,
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ const ChainButtonIcon = ({ output }: { output: boolean | undefined }) => {
<ChainImage
chainId={selectedOutputChainId ?? animatedSelectedOutputChainId.value ?? ChainId.mainnet}
size={24}
badgeXPosition={6}
badgeYPosition={-6}
badgeXPosition={-20}
badgeYPosition={-8}
/>
) : userAssetsFilter && userAssetsFilter !== 'all' ? (
<ChainImage chainId={userAssetsFilter} size={24} />
<ChainImage chainId={userAssetsFilter} size={24} badgeXPosition={-20} badgeYPosition={-8} />
) : (
<></>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/context-menu-buttons/ChainContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const ChainContextMenu = ({
)}
{selectedChainId && (
<Bleed vertical="4px">
<ChainImage chainId={selectedChainId} size={16} />
<ChainImage chainId={selectedChainId} size={24} badgeXPosition={-20} badgeYPosition={-8} />
</Bleed>
)}
<Text color={textColor} numberOfLines={1} size={textSize} weight={textWeight}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ export const TransactionDetailsValueAndFeeSection: React.FC<Props> = ({ transact
chainId={assetData?.chainId || ChainId.mainnet}
symbol={assetData?.symbol || ''}
color={assetData?.colors?.primary || assetData?.colors?.fallback || undefined}
chainBadgePosition={{
x: -12,
y: -6,
}}
/>
)
}
Expand Down

0 comments on commit e9f7542

Please sign in to comment.