diff options
| author | Henry Jameson <me@hjkos.com> | 2020-05-10 06:46:06 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2020-05-10 06:46:06 +0300 |
| commit | bcebec478e43b3851e85c94335940e8fc7546cc8 (patch) | |
| tree | 085b19f056e0d2522f0b0a0f9125fda3fd082f66 /src/components/modal/modal.vue | |
| parent | 2e35289c3376881ca17b9330113c816a3327f245 (diff) | |
moved stuff from settings, cleaned up naming for tabs, added close and peek
Diffstat (limited to 'src/components/modal/modal.vue')
| -rw-r--r-- | src/components/modal/modal.vue | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index cee24241..e5ecc0c0 100644 --- a/src/components/modal/modal.vue +++ b/src/components/modal/modal.vue @@ -3,6 +3,7 @@ v-show="isOpen" v-body-scroll-lock="isOpen" class="modal-view" + :class="{ 'modal-background': !noBackground }" @click.self="$emit('backdropClicked')" > <slot /> @@ -15,6 +16,10 @@ export default { isOpen: { type: Boolean, default: true + }, + noBackground: { + type: Boolean, + default: false } } } @@ -32,10 +37,19 @@ export default { justify-content: center; align-items: center; overflow: auto; + pointer-events: none; animation-duration: 0.2s; - background-color: rgba(0, 0, 0, 0.5); animation-name: modal-background-fadein; + > * { + pointer-events: initial; + } + + &.modal-background { + pointer-events: initial; + background-color: rgba(0, 0, 0, 0.5); + } + body:not(.scroll-locked) & { opacity: 0; } |
