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> </tbody>
</table> </table>
<ModalView v-if="openedEmail"> <ModalView v-if="openedEmail" :closeModal="() => { openedEmail = null; }">
<MailView :email="openedEmail" /> <MailView v-if="openedEmail" :email="openedEmail" />
</ModalView> </ModalView>
</template> </template>

View File

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