Robert Schäfer b7ca8a426b Render modals in a closed state and hide
I found out that when you umount the modals completely you don't get the
nice hide effect of `<ds-modal>`. It should be safe to still have all
modals in the DOM.
2019-03-10 15:19:23 +01:00

33 lines
537 B
Vue

<template>
<div class="modal-wrapper">
<disable-modal
:is-open="open === 'disable'"
:resource="data"
@close="close"
/>
</div>
</template>
<script>
import DisableModal from '~/components/Modal/DisableModal'
import { mapGetters } from 'vuex'
export default {
name: 'Modal',
components: {
DisableModal
},
computed: {
...mapGetters({
data: 'modal/data',
open: 'modal/open'
})
},
methods: {
close() {
this.$store.commit('modal/SET_OPEN', {})
}
}
}
</script>