diff --git a/packages/bbui/src/Notification/Notification.svelte b/packages/bbui/src/Notification/Notification.svelte new file mode 100644 index 0000000000..cebc859bda --- /dev/null +++ b/packages/bbui/src/Notification/Notification.svelte @@ -0,0 +1,20 @@ + + +
+ {#if icon} + + {/if} +
+
{message || ""}
+
+
diff --git a/packages/bbui/src/Notification/NotificationDisplay.svelte b/packages/bbui/src/Notification/NotificationDisplay.svelte index 89e7666cc7..9d96bf7e70 100644 --- a/packages/bbui/src/Notification/NotificationDisplay.svelte +++ b/packages/bbui/src/Notification/NotificationDisplay.svelte @@ -2,30 +2,16 @@ import "@spectrum-css/toast/dist/index-vars.css" import Portal from "svelte-portal" import { flip } from "svelte/animate" - import { fly } from "svelte/transition" import { notifications } from "../Stores/notifications" + import Notification from "./Notification.svelte" + import { fly } from "svelte/transition"
{#each $notifications as { type, icon, message, id } (id)} -
- {#if icon} - - {/if} -
-
{message}
-
+
+
{/each}
@@ -34,7 +20,7 @@ diff --git a/packages/bbui/src/index.js b/packages/bbui/src/index.js index 4d045e504b..3a491bfb54 100644 --- a/packages/bbui/src/index.js +++ b/packages/bbui/src/index.js @@ -38,6 +38,7 @@ export { default as MenuItem } from "./Menu/Item.svelte" export { default as Modal } from "./Modal/Modal.svelte" export { default as ModalContent } from "./Modal/ModalContent.svelte" export { default as NotificationDisplay } from "./Notification/NotificationDisplay.svelte" +export { default as Notification } from "./Notification/Notification.svelte" export { default as SideNavigation } from "./SideNavigation/Navigation.svelte" export { default as SideNavigationItem } from "./SideNavigation/Item.svelte" export { default as DatePicker } from "./Form/DatePicker.svelte"