Implement EditAccount in Frontend

This commit is contained in:
2022-02-24 22:12:26 +00:00
parent f51807e459
commit 466df523ab
2 changed files with 49 additions and 8 deletions

View File

@ -7,7 +7,8 @@ const props = defineProps<{
}>();
const emit = defineEmits<{
(e: 'submit'): void
(e: 'submit'): void,
(e: 'open'): void,
}>();
const visible = ref(false);
@ -15,6 +16,7 @@ function closeDialog() {
visible.value = false;
};
function openDialog() {
emit("open");
visible.value = true;
};
function submitDialog() {
@ -24,10 +26,14 @@ function submitDialog() {
</script>
<template>
<Card>
<p class="w-24 text-center text-6xl">+</p>
<button class="text-lg" dark @click="openDialog">{{ buttonText }}</button>
</Card>
<button @click="openDialog">
<slot name="placeholder">
<Card>
<p class="w-24 text-center text-6xl">+</p>
<span class="text-lg" dark>{{ buttonText }}</span>
</Card>
</slot>
</button>
<div
v-if="visible"
class="fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full"