mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-11 18:54:31 +00:00
Click on overly to close modal
This commit is contained in:
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user