DigitalConsumer.FixMyGlass/src/common-components/loading-modal/loading-modal.vue
2022-05-09 15:17:46 -04:00

101 lines
No EOL
2.1 KiB
Vue

<template>
<div v-show="isModalVisible" class="loading-modal-backdrop">
<div class="loading-modal">
<section class="loading-modal-body">
<div class="modal-icon-container text-center">
<img class="loader-gif" alt="Loading" src="@/assets/img/loader.gif">
<img class="modal-icon" alt="" src="@/assets/img/windshield.png">
</div>
<div class="text-center fw-bold fs-5 loading-modal-text">
<slot name="body">
Default text
</slot>
</div>
<div class="text-center fs-5 loading-modal-text">
<slot name="subtext">
Default subtext
</slot>
</div>
</section>
</div>
</div>
</template>
<script>
export default {
name: 'Modal',
data() {
return {
isModalVisible: false,
};
},
methods: {
showModal() {
this.isModalVisible = true;
},
},
};
</script>
<style lang="scss">
.loading-modal-backdrop {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: #e5e5e5;
display: flex;
justify-content: center;
align-items: center;
z-index: 1050;
width: 100vw;
height: 100vh;
}
.loading-modal {
position: absolute;
background: #ffffff;
padding: 0 0 32px 0;
box-shadow: 2px 2px 20px 1px;
overflow: hidden;
display: flex;
flex-direction: column;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
border-radius: 4px;
top: 48px;
height: 246px;
width: 327px;
}
.loading-modal-body {
position: relative;
padding: 20px 10px;
}
.loading-modal-text {
padding: 0 24px 0 24px;
}
.modal-icon-container {
position: relative;
width: 75px;
height: 75px;
margin: 15px auto;
padding-bottom: 26px;
}
.modal-icon-container img {
position: absolute;
vertical-align: middle;
border: 0;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.loader-gif {
width: 75px;
height: 75px;
}
</style>