Bring back popup
This commit is contained in:
parent
e61a1080f7
commit
2b73e745da
@ -35,8 +35,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Popup from '~/components/ui/Popup'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ConfirmPopup',
|
name: 'ConfirmPopup',
|
||||||
|
components: {
|
||||||
|
Popup,
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
confirmationText: {
|
confirmationText: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
47
components/ui/Popup.vue
Normal file
47
components/ui/Popup.vue
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<template>
|
||||||
|
<div v-if="showPopup">
|
||||||
|
<div class="popup-overlay" />
|
||||||
|
<div class="popup-body">
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Popup',
|
||||||
|
props: {
|
||||||
|
showPopup: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.popup-overlay {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1;
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: var(--color-button-bg);
|
||||||
|
border: none;
|
||||||
|
opacity: 0.6;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
.popup-body {
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
z-index: 2;
|
||||||
|
box-shadow: 0 2px 3px 1px var(--color-button-bg);
|
||||||
|
border-radius: 10px;
|
||||||
|
max-height: 80%;
|
||||||
|
overflow-y: auto;
|
||||||
|
background-color: var(--color-bg);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
x
Reference in New Issue
Block a user