fix(notification): avoid dynamic class strings

Fixes https://github.com/carbon-design-system/carbon-preprocess-svelte/issues/39
This commit is contained in:
Eric Liu 2022-08-05 05:07:04 -07:00
commit 298d8de723
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'}"
/>