Skip to content

Commit

Permalink
chore: merge
Browse files Browse the repository at this point in the history
  • Loading branch information
walmat committed Dec 19, 2024
2 parents 5647e22 + 3c4334f commit f367641
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/components/coin-icon/ChainImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,18 @@ const ChainIcon = styled(FastImage)(({ containerSize, iconSize }: ChainIconProps
}));

type ChainIconPositionWrapperProps = {
marginBottom: number;
iconSize: number;
badgeXPosition: number;
badgeYPosition: number;
position: 'absolute' | 'relative';
};

const ChainIconPositionWrapper = styled(Centered)(
({ marginBottom, iconSize, badgeXPosition, badgeYPosition, position }: ChainIconPositionWrapperProps) => ({
({ iconSize, badgeXPosition, badgeYPosition, position }: ChainIconPositionWrapperProps) => ({
bottom: position === 'relative' ? 0 : badgeYPosition,
left: position === 'relative' ? 0 : badgeXPosition,
...positions.sizeAsObject(iconSize),
elevation: 10,
marginBottom,
overflow: 'visible',
position: position || 'absolute',
zIndex: 10,
Expand Down Expand Up @@ -68,13 +66,7 @@ export function ChainImage({
if (!badgeUrl || !showBadge) return null;

return badgeXPosition || badgeYPosition ? (
<ChainIconPositionWrapper
badgeXPosition={badgeXPosition}
badgeYPosition={badgeYPosition}
iconSize={iconSize}
marginBottom={0}
position={position}
>
<ChainIconPositionWrapper badgeXPosition={badgeXPosition} badgeYPosition={badgeYPosition} iconSize={iconSize} position={position}>
<ChainIcon containerSize={containerSize} iconSize={iconSize} source={{ uri: badgeUrl }} />
</ChainIconPositionWrapper>
) : (
Expand Down

0 comments on commit f367641

Please sign in to comment.