add reusable modal component

This commit is contained in:
taehoon 2019-10-18 07:04:24 -04:00
parent 093d785fbf
commit 07ec18fe11

View file

@ -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>