Browse Source

Add base modal

pull/1206/head
Hironsan 3 years ago
parent
commit
18c02deb2d
1 changed files with 32 additions and 0 deletions
  1. 32
      frontend/components/atoms/BaseModal.vue

32
frontend/components/atoms/BaseModal.vue

@ -0,0 +1,32 @@
<template>
<v-dialog
v-model="dialog"
width="800px"
>
<template v-slot:activator="{ on }">
<slot name="opener" :open="open" />
</template>
<slot name="content" :close="close" />
</v-dialog>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
data() {
return {
dialog: false as Boolean
}
},
methods: {
close(): void {
this.dialog = false
},
open(): void {
this.dialog = true
}
}
})
</script>
Loading…
Cancel
Save