Line data Source code
1 16 : <script setup lang="ts">
2 : import type { ToastRootEmits, ToastRootProps } from 'reka-ui'
3 : import { ToastRoot, useForwardPropsEmits } from 'reka-ui'
4 : import type { HTMLAttributes } from 'vue'
5 :
6 : import { cn } from '@comfyorg/tailwind-utils'
7 :
8 2355 : const { class: className, ...restProps } = defineProps<
9 : ToastRootProps & { class?: HTMLAttributes['class'] }
10 : >()
11 : const emits = defineEmits<ToastRootEmits>()
12 168 : const forwarded = useForwardPropsEmits(restProps, emits)
13 168 : </script>
14 :
15 : <template>
16 199 : <ToastRoot
17 : v-bind="forwarded"
18 : aria-live="off"
19 : :class="
20 : cn(
21 : 'pointer-events-auto relative grid w-full grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-3 rounded-lg border bg-background p-4 shadow-lg',
22 : className
23 : )
24 : "
25 : >
26 : <div class="contents" data-reka-toast-announce-exclude="">
27 : <slot />
28 : </div>
29 : </ToastRoot>
30 : </template>
|