Added a reusable Modal component for the apply tag functionality

This commit is contained in:
Josh Creek
2019-05-11 11:07:29 +01:00
parent 40f9eeead9
commit 4163341c65
3 changed files with 176 additions and 3 deletions
+41
View File
@@ -0,0 +1,41 @@
<template>
<div id="app">
<button
type="button"
class="btn"
@click="showModal"
>
Open Modal!
</button>
<modal
v-show="isModalVisible"
@close="closeModal"
/>
</div>
</template>
<script>
import Modal from '../components/Modal.vue';
export default {
name: 'app',
components: {
Modal,
},
data () {
return {
isModalVisible: false,
};
},
methods: {
showModal() {
this.isModalVisible = true;
},
closeModal() {
this.isModalVisible = false;
}
},
};
</script>