Skip to content

Commit 7bd4285

Browse files
committed
Fix notification bell position to remain consistent regardless of badge presence
1 parent b45b99d commit 7bd4285

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/components/common/LiquidBlueBadge/LiquidBlueBadge.styles.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,21 @@ export const StyledLiquidBadge = styled(Badge)`
6161
}
6262
6363
&.notification-badge {
64+
position: relative;
65+
display: inline-block;
66+
6467
& .ant-badge-count {
65-
right: 6px;
66-
top: -12px;
68+
position: absolute;
69+
right: -8px;
70+
top: -8px;
71+
transform: none;
72+
}
73+
74+
/* Ensure the wrapper doesn't shift when badge appears/disappears */
75+
& .ant-badge-count-sm {
76+
position: absolute;
77+
right: -8px;
78+
top: -8px;
6779
}
6880
}
6981
`;

src/components/header/components/notificationsDropdown/NotificationsDropdown.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,10 @@ export const NotificationsDropdown: React.FC = () => {
169169
icon={
170170
<LiquidBlueBadge
171171
count={totalUnreadCount > 0 ? totalUnreadCount : 0}
172+
showZero={false}
172173
overflowCount={99}
173174
dot={false}
175+
style={{ lineHeight: 1 }}
174176
>
175177
<BellOutlined />
176178
</LiquidBlueBadge>

0 commit comments

Comments
 (0)