updated modal

This commit is contained in:
Mamalizz
2025-02-14 01:24:03 +03:30
parent 411d37b02d
commit a9ac2cd7f3
+10 -1
View File
@@ -6,6 +6,7 @@ type Props = {
icon?: string; icon?: string;
title: string; title: string;
iconSize?: string; iconSize?: string;
contectClass?: string;
}; };
type Emits = { type Emits = {
@@ -35,7 +36,14 @@ const isShow = computed({
</script> </script>
<template> <template>
<DialogRoot v-model:open="isShow"> <DialogRoot
v-model:open="isShow"
@update:open="
(state) => {
!state ? (isShow = false) : null;
}
"
>
<DialogTrigger> <DialogTrigger>
<slot name="trigger" /> <slot name="trigger" />
</DialogTrigger> </DialogTrigger>
@@ -49,6 +57,7 @@ const isShow = computed({
v-if="isShow" v-if="isShow"
> >
<div <div
:class="contectClass"
class="overflow-y-auto max-h-svh absolute left-[50%] py-10 w-fit max-w-[50rem] translate-x-[-50%]" class="overflow-y-auto max-h-svh absolute left-[50%] py-10 w-fit max-w-[50rem] translate-x-[-50%]"
> >
<DialogContent <DialogContent