Skip to content

Commit

Permalink
feat(shortmodal): add closeOnClickOutside prop
Browse files Browse the repository at this point in the history
  • Loading branch information
Masa-Shin committed Feb 12, 2025
1 parent e25036e commit 92a8b15
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/ShortModal/ShortModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
background: filterBackground,
zIndex,
}"
@click="$emit('close')"
@click="() => closeOnClickOutside && $emit('close')"
></div>
<div
class="modal-container"
Expand Down Expand Up @@ -72,6 +72,10 @@ export default defineComponent({
type: Boolean,
default: true,
},
closeOnClickOutside: {
type: Boolean,
default: true,
},
},
emits: {
close: null,
Expand Down

0 comments on commit 92a8b15

Please sign in to comment.