Files
speckle-server/packages/frontend-2/components/singleton/ToastManager.vue
T
andrewwallacespeckle 614fdbb14e fix(fe2): Make toasts clickable when dialogs are open (#3176)
* Add portal to dialog

* Changes from talk with Fabs
2024-10-02 11:07:46 +01:00

22 lines
510 B
Vue

<template>
<Teleport to="#toast-portal">
<GlobalToastRenderer v-model:notification="notification" />
</Teleport>
</template>
<script setup lang="ts">
import { useGlobalToastManager } from '~~/lib/common/composables/toast'
import { GlobalToastRenderer } from '@speckle/ui-components'
const { currentNotification, dismiss } = useGlobalToastManager()
const notification = computed({
get: () => currentNotification.value,
set: (newVal) => {
if (!newVal) {
dismiss()
}
}
})
</script>