fix(notification): avoid dynamic class names in NotificationButton, NotificationIcon (#1425)

Fixes https://github.com/carbon-design-system/carbon-preprocess-svelte/issues/39
This commit is contained in:
metonym 2022-08-05 05:20:21 -07:00 committed by GitHub
commit d2cc75d883
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -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'}"
/>
</button>

View file

@ -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'}"
/>