Line data Source code
1 4 : <template>
2 6 : <section
3 : class="relative flex min-h-0 w-[min(32rem,calc(100vw-2rem))] flex-col gap-6 overflow-y-auto rounded-2xl border bg-background p-8"
4 : >
5 : <Button
6 : variant="muted-textonly"
7 : size="icon"
8 : class="absolute top-4 right-4"
9 : :aria-label="$t('g.close')"
10 : :disabled="closeDisabled"
11 : @click="onClose"
12 : >
13 : <i class="icon-[lucide--x]" aria-hidden="true" />
14 : </Button>
15 :
16 : <div class="flex flex-col gap-5">
17 : <header class="flex flex-col gap-2 pr-8">
18 : <DialogTitle class="m-0 flex items-center gap-2 text-2xl">
19 : {{ title }}
20 : <slot name="title-icon" />
21 : </DialogTitle>
22 : <p v-if="subtitle" class="m-0 text-sm text-muted-foreground">
23 : {{ subtitle }}
24 : </p>
25 : </header>
26 : <slot />
27 : </div>
28 :
29 : <footer class="flex flex-wrap items-center justify-end gap-2">
30 : <slot name="actions" />
31 : </footer>
32 : </section>
33 : </template>
34 :
35 : <script setup lang="ts">
36 : import Button from '@comfyorg/design-system/button/Button'
37 : import DialogTitle from '@comfyorg/design-system/dialog/DialogTitle'
38 :
39 : const { closeDisabled = false } = defineProps<{
40 : title: string
41 : subtitle?: string
42 : closeDisabled?: boolean
43 : onClose: () => void
44 : }>()
45 : </script>
|