aboutsummaryrefslogtreecommitdiff
path: root/src/components/modal/modal.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/modal/modal.vue')
-rw-r--r--src/components/modal/modal.vue29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue
new file mode 100644
index 00000000..389a8881
--- /dev/null
+++ b/src/components/modal/modal.vue
@@ -0,0 +1,29 @@
+<template>
+ <div
+ v-body-scroll-lock="true"
+ @click.self="closeModal"
+ class="modal-view"
+ >
+ <slot />
+ </div>
+</template>
+
+<script>
+export default {
+ methods: {
+ closeModal () {
+ this.$emit('close')
+ }
+ }
+}
+</script>
+
+<style lang="scss">
+
+.modal-view {
+ body:not(.scroll-locked) & {
+ display: none;
+ }
+}
+
+</style>