Skip to content

Commit 17c0528

Browse files
committed
Fix notification icon being misaligned
1 parent f879c43 commit 17c0528

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

src/components/shared/Notifications.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,6 @@ export const NotificationComponent = ({
103103

104104
return (
105105
<div className={cn(notification.type, "alert sticky")}>
106-
{notification.type === "warning" &&
107-
<LuTriangleAlert className="warning-symbol-warning" />
108-
}
109-
{notification.type === "error" &&
110-
<LuTriangleAlert className="warning-symbol-error" />
111-
}
112106
{closeNotification &&
113107
<ButtonLikeAnchor
114108
onClick={() => closeNotification(notification.id)}
@@ -117,7 +111,15 @@ export const NotificationComponent = ({
117111
<LuX />
118112
</ButtonLikeAnchor>
119113
}
120-
<p>{t(notification.message, notification.parameter)}</p>
114+
<p>
115+
{(notification.type === "warning") &&
116+
<LuTriangleAlert className="warning-symbol-warning" />
117+
}
118+
{(notification.type === "error") &&
119+
<LuTriangleAlert className="warning-symbol-error" />
120+
}
121+
{t(notification.message, notification.parameter)}
122+
</p>
121123
</div>
122124
);
123125
};

src/styles/components/_alerts.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,13 @@
184184
.warning-symbol-warning {
185185
color: variables.$state-warning-text;
186186
margin-right: 5px;
187+
font-size: 17px;
187188
}
188189

189190
.warning-symbol-error {
190191
color: variables.$state-danger-text;
191192
margin-right: 5px;
193+
font-size: 17px;
192194
}
193195
}
194196

0 commit comments

Comments
 (0)