Skip to content

Commit ca689f6

Browse files
committed
chore: add outside click close
1 parent b7dac02 commit ca689f6

File tree

1 file changed

+3
-3
lines changed
  • storage/framework/core/components/modal/src/components

1 file changed

+3
-3
lines changed

storage/framework/core/components/modal/src/components/Modal.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ defineCustomElement({
4242
<template>
4343
<transition name="fade">
4444
<div v-if="isVisible" class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true">
45-
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true" @click.self="handleClose" />
45+
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true" />
4646

4747
<div class="fixed inset-0 z-10 w-screen overflow-y-auto">
48-
<div class="min-h-full flex items-end justify-center p-4 text-center sm:items-center sm:p-0">
49-
<div class="relative transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 sm:max-w-lg sm:w-full sm:p-6">
48+
<div class="min-h-full flex items-end justify-center p-4 text-center sm:items-center sm:p-0" @click.self="handleClose">
49+
<div class="relative transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 sm:max-w-lg sm:w-full sm:p-6" @click.stop>
5050
<slot v-if="isCloseButtonVisible" name="close-button">
5151
<div class="absolute right-0 top-0 pr-4 pt-4 sm:block">
5252
<button type="button" class="rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" @click="handleClose">

0 commit comments

Comments
 (0)