knowyt/client/src/components/ModalDialog.vue

44 lines
817 B
Vue
Raw Normal View History

2022-09-04 18:06:26 +00:00
<template>
<div class="modal-dialog__container">
<DialogBox :title="title" :no-close-button="noCloseButton" @close="emit('close')">
<slot />
<template v-slot:footer>
2022-09-04 18:06:26 +00:00
<slot name="footer" />
</template>
</DialogBox>
2022-09-04 18:06:26 +00:00
<div class="modal-dialog__backdrop" />
</div>
</template>
<script setup lang="ts">
defineProps<{
title?: string
2022-09-09 10:50:05 +00:00
noCloseButton?: boolean
2022-09-04 18:06:26 +00:00
}>()
2022-09-04 18:06:26 +00:00
const emit = defineEmits(['close'])
</script>
<style lang="scss">
@import '~/assets/css/components';
.modal-dialog {
&__container {
display: flex;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
&__backdrop {
position: absolute;
width: 100%;
height: 100%;
background-color: $modal-dialog-backdrop-background-color;
z-index: 10;
}
}
</style>