Files
speckle-server/packages/frontend-2/components/singleton/ToastManager.vue
T
2025-01-06 13:30:39 +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>