Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 1x | <script setup lang="ts">
import { Dialog, DialogPanel, DialogTitle } from '@headlessui/vue'
defineProps<{
open: boolean
title?: string
}>()
const emit = defineEmits<{
(e: 'close'): void
}>()
</script>
<template>
<Dialog :open="open" class="relative z-50" @close="emit('close')">
<div class="fixed inset-0 bg-black/30" aria-hidden="true"></div>
<div class="fixed inset-0 flex items-end justify-center p-4 sm:items-center">
<DialogPanel class="w-full max-w-md rounded-3xl bg-white p-5 shadow-soft sm:rounded-2xl">
<DialogTitle v-if="title" class="tnum mb-3 text-lg font-semibold tracking-tight">{{ title }}</DialogTitle>
<slot />
</DialogPanel>
</div>
</Dialog>
</template> |