From d2cc75d8837e4edcf52a8e731b7c63d285b25551 Mon Sep 17 00:00:00 2001 From: metonym Date: Fri, 5 Aug 2022 05:20:21 -0700 Subject: [PATCH] fix(notification): avoid dynamic class names in `NotificationButton`, `NotificationIcon` (#1425) Fixes https://github.com/carbon-design-system/carbon-preprocess-svelte/issues/39 --- src/Notification/NotificationButton.svelte | 4 +++- src/Notification/NotificationIcon.svelte | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Notification/NotificationButton.svelte b/src/Notification/NotificationButton.svelte index 63e1d3b9..b25647b7 100644 --- a/src/Notification/NotificationButton.svelte +++ b/src/Notification/NotificationButton.svelte @@ -40,6 +40,8 @@ this="{icon}" size="{20}" title="{title}" - class="bx--{notificationType}-notification__close-icon" + class="{notificationType === 'toast' && + 'bx--toast-notification__close-icon'} {notificationType === 'inline' && + 'bx--inline-notification__close-icon'}" /> diff --git a/src/Notification/NotificationIcon.svelte b/src/Notification/NotificationIcon.svelte index 8e2d61b6..dc6defa8 100644 --- a/src/Notification/NotificationIcon.svelte +++ b/src/Notification/NotificationIcon.svelte @@ -35,5 +35,7 @@ this="{icons[kind]}" size="{20}" title="{iconDescription}" - class="bx--{notificationType}-notification__icon" + class="{notificationType === 'toast' && + 'bx--toast-notification__icon'} {notificationType === 'inline' && + 'bx--inline-notification__icon'}" />