mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-08 12:27:44 +00:00
29 lines
775 B
Vue
29 lines
775 B
Vue
<script setup lang="ts">
|
|
import { useToast } from "./use-toast";
|
|
|
|
const { toasts } = useToast();
|
|
</script>
|
|
|
|
<template>
|
|
<ToastProvider>
|
|
<Toast v-for="toast in toasts" :key="toast.id" v-bind="toast">
|
|
<div class="grid gap-1">
|
|
<ToastTitle v-if="toast.title">
|
|
{{ toast.title }}
|
|
</ToastTitle>
|
|
<template v-if="toast.description">
|
|
<ToastDescription v-if="isVNode(toast.description)">
|
|
<component :is="toast.description" />
|
|
</ToastDescription>
|
|
<ToastDescription v-else>
|
|
{{ toast.description }}
|
|
</ToastDescription>
|
|
</template>
|
|
<ToastClose />
|
|
</div>
|
|
<component :is="toast.action" />
|
|
</Toast>
|
|
<ToastViewport />
|
|
</ToastProvider>
|
|
</template>
|