@marianmeres/stuic 2.1.16 → 2.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
|
|
134
134
|
let _iconFns = $derived({ ...notificationsDefaultIcons, ...iconFns });
|
|
135
135
|
|
|
136
|
-
const maybeIcon = (n: Notification) => n.iconFn ?? _iconFns?.[n.type];
|
|
136
|
+
const maybeIcon = (n: Notification) => (n.iconFn ?? _iconFns?.[n.type])?.();
|
|
137
137
|
|
|
138
138
|
const _classWrapX = `
|
|
139
139
|
fixed z-50 flex flex-row inset-0
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
<div class={twMerge("wrap-y", _classWrapY, YMAP_M[yMobile], YMAP[y], classWrapY)}>
|
|
223
223
|
{#each notifications.stack as n (n.id)}
|
|
224
224
|
{@const { Cmp, props } = maybeComponent(n)}
|
|
225
|
-
{@const
|
|
225
|
+
{@const iconHtml = maybeIcon(n)}
|
|
226
226
|
{@const showXButton = !noXButton || n.ttl > 1000}
|
|
227
227
|
{#if Cmp}
|
|
228
228
|
<Cmp {...props || {}} notification={n} {notifications} />
|
|
@@ -247,9 +247,9 @@
|
|
|
247
247
|
{n.count}
|
|
248
248
|
</div>
|
|
249
249
|
{/if}
|
|
250
|
-
{#if !noIcons &&
|
|
250
|
+
{#if !noIcons && iconHtml}
|
|
251
251
|
<div class={twMerge("icon", _classNotifIcon, classNotifIcon)}>
|
|
252
|
-
{@html
|
|
252
|
+
{@html iconHtml}
|
|
253
253
|
</div>
|
|
254
254
|
{/if}
|
|
255
255
|
|