Line data Source code
1 16 : <script setup lang="ts">
2 : import type { ToastViewportProps } from 'reka-ui'
3 : import { ToastViewport, useForwardProps } 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 : ToastViewportProps & {
10 : class?: HTMLAttributes['class']
11 : label: NonNullable<ToastViewportProps['label']>
12 : }
13 : >()
14 138 : const forwardedProps = useForwardProps(restProps)
15 138 : </script>
16 :
17 : <template>
18 177 : <ToastViewport v-bind="forwardedProps" as-child>
19 : <ol
20 : class="z-toast"
21 : :class="
22 : cn(
23 : 'pointer-events-none fixed top-20 right-(--workspace-inset-right,0px) m-0 flex max-h-[calc(100dvh-5rem)] w-full max-w-sm flex-col gap-2 overflow-y-auto p-2 supports-[right:anchor(--a_right)]:top-[anchor(--graph-canvas-panel_top,0px)] supports-[right:anchor(--a_right)]:right-[anchor(--graph-canvas-panel_right,anchor(--docked-agent-panel_left,var(--workspace-inset-right,0px)))] [body:has(>[data-slot=dialog-portal]>[data-reka-dialog-content][data-state=open]:not([data-maximized]))_&]:top-0',
24 : className
25 : )
26 : "
27 : />
28 : </ToastViewport>
29 : </template>
|