feat: custom sizing for modal

This commit is contained in:
DecDuck
2025-03-11 12:15:47 +11:00
parent 637b4e1e9b
commit ce59647cda

View File

@ -29,7 +29,7 @@
leave-to="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" leave-to="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
> >
<div <div
class="relative transform rounded-lg bg-zinc-900 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg" :class="['relative transform rounded-lg bg-zinc-900 text-left shadow-xl transition-all sm:my-8 sm:w-full', props.sizeClass ?? 'sm:max-w-lg']"
> >
<div class="px-4 pb-4 pt-5 space-y-4 sm:p-6 sm:pb-4"> <div class="px-4 pb-4 pt-5 space-y-4 sm:p-6 sm:pb-4">
<slot /> <slot />
@ -56,6 +56,7 @@ import {
} from "@headlessui/vue"; } from "@headlessui/vue";
const open = defineModel<boolean>(); const open = defineModel<boolean>();
const props = defineProps<{sizeClass?: string}>();
function close() { function close() {
open.value = false; open.value = false;