Skip to content

Commit

Permalink
Always teleport the Dialog component to the body tag
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl authored and patrickelectric committed Sep 19, 2023
1 parent 0cb56f4 commit f423d0e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/Dialog.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<template>
<dialog ref="dialogRef" class="modal">
<div ref="dialogContentRef" class="flex flex-col items-center justify-center w-full h-full p-5 backdrop-blur-sm">
<slot></slot>
</div>
</dialog>
<teleport to="body">
<dialog ref="dialogRef" class="modal">
<div ref="dialogContentRef" class="flex flex-col items-center justify-center w-full h-full p-5 backdrop-blur-sm">
<slot></slot>
</div>
</dialog>
</teleport>
</template>

<script setup lang="ts">
Expand Down

0 comments on commit f423d0e

Please sign in to comment.