Skip to content

Commit 707a4af

Browse files
committed
remove extra margin
1 parent 0967060 commit 707a4af

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/components/SelectionList/Search/CardListItemHeader.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ function CardListItemHeader<TItem extends ListItem>({card: cardItem, onCheckboxP
8787
mainAvatar={memberAvatar}
8888
subscriptIcon={cardIcon}
8989
backgroundColor={backgroundColor}
90+
noMargin
9091
/>
9192
<View style={[styles.gapHalf]}>
9293
<TextWithTooltip

src/styles/utils/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,20 @@ function getAvatarBorderStyle(size: AvatarSizeName, type: string): ViewStyle {
283283
function getAvatarSubscriptIconContainerStyle(iconWidth = 16, iconHeight = 16): ViewStyle {
284284
const borderWidth = 2;
285285

286+
// The width of the container is the width of the icon + 2x border width (left and right)
287+
const containerWidth = iconWidth + 2 * borderWidth;
288+
// The height of the container is the height of the icon + 2x border width (top and bottom)
289+
const containerHeight = iconHeight + 2 * borderWidth;
290+
286291
return {
287292
overflow: 'hidden',
288293
position: 'absolute',
289294
bottom: -4,
290295
right: -4,
291296
borderWidth,
292297
borderRadius: borderWidth,
293-
width: iconWidth + 2 * borderWidth,
294-
height: iconHeight + 2 * borderWidth,
298+
width: containerWidth,
299+
height: containerHeight,
295300
};
296301
}
297302

0 commit comments

Comments
 (0)