mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-16 12:54:42 +00:00
Modal display and opening
This commit is contained in:
@@ -18,13 +18,16 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<MailView :email="openedEmail" v-if="openedEmail" />
|
||||
<ModalView v-if="openedEmail">
|
||||
<MailView :email="openedEmail" />
|
||||
</ModalView>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { format } from 'date-fns';
|
||||
import axios from 'axios';
|
||||
import MailView from '@/components/MailView.vue';
|
||||
import ModalView from '@/components/ModalView.vue';
|
||||
|
||||
export default {
|
||||
async setup(){
|
||||
@@ -38,7 +41,8 @@
|
||||
}
|
||||
},
|
||||
components: {
|
||||
MailView
|
||||
MailView,
|
||||
ModalView
|
||||
},
|
||||
computed: {
|
||||
unarchivedEmails(){
|
||||
|
||||
18
src/components/ModalView.vue
Normal file
18
src/components/ModalView.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<div class="modal">
|
||||
<div class="overlay"></div>
|
||||
<div class="modal-card">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user