From d251f52d0792679c6fae66bc6144f7e0d87f92f6 Mon Sep 17 00:00:00 2001 From: Jean-Marc Millet Date: Tue, 23 Jan 2024 10:37:33 +0100 Subject: [PATCH] add case for undefined variant --- .../components/notifications/Notification.component.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/components/notifications/Notification.component.tsx b/src/lib/components/notifications/Notification.component.tsx index c18efc9a59..9b2cfd3d0b 100644 --- a/src/lib/components/notifications/Notification.component.tsx +++ b/src/lib/components/notifications/Notification.component.tsx @@ -36,14 +36,18 @@ const NotificationContainer = styled.div<{ variant?: Variant }>` background-color: ${background}; color: ${black}; `; - + case undefined: + return css` + background-color: ${background}; + color: ${props.theme.textPrimary}; + `; default: return css` background-color: ${background}; color: ${white}; `; } - }} + }}; `; const NotificationTitle = styled.div` padding: 0 ${spacing.r16} ${spacing.r4} 0;