Click on overly to close modal

This commit is contained in:
Jeffrey Biles
2020-03-29 14:40:18 -07:00
parent 4789f44bbe
commit 77e1a1d407
2 changed files with 9 additions and 4 deletions

View File

@@ -18,8 +18,8 @@
</tbody>
</table>
<ModalView v-if="openedEmail">
<MailView :email="openedEmail" />
<ModalView v-if="openedEmail" :closeModal="() => { openedEmail = null; }">
<MailView v-if="openedEmail" :email="openedEmail" />
</ModalView>
</template>

View File

@@ -1,6 +1,6 @@
<template>
<div class="modal">
<div class="overlay"></div>
<div class="overlay" @click="closeModal"></div>
<div class="modal-card">
<slot />
</div>
@@ -9,7 +9,12 @@
<script>
export default {
props: {
closeModal: {
type: Function,
required: true
}
}
}
</script>