<Modal
ref="modal"
:class="{ 'border border-l-4 border-l-theme-failure': isDanger }"
- :title="title"
:closeHandler="cancelHandler"
>
+ <!-- Title -->
+ <div class="mb-6 text-xl">{{ title }}</div>
<!-- Message -->
<div class="mb-6">{{ message }}</div>
<!-- Buttons -->
<template>
<!-- Mask -->
<div
+ v-if="isVisible"
class="fixed left-0 top-0 z-50 flex h-dvh w-dvw items-center justify-center bg-theme-background-tint/40 backdrop-blur-sm"
- :class="{ hidden: !isVisible }"
>
<!-- Modal -->
<div
- class="max-w-96 grow rounded-lg border border-theme-border bg-theme-background px-6 py-4 shadow-lg"
+ class="relative max-w-96 grow rounded-lg border border-theme-border bg-theme-background px-6 py-4 shadow-lg"
:class="$attrs.class"
>
- <!-- Title -->
- <div class="mb-6 flex justify-between">
- <div class="text-xl">{{ title }}</div>
- <CustomButton :iconPath="mdiWindowClose" @click="close" />
- </div>
- <!-- Slot -->
+ <CustomButton
+ :iconPath="mdiWindowClose"
+ @click="close"
+ class="absolute right-1 top-1"
+ />
<slot></slot>
</div>
</div>
const props = defineProps({
closeHandler: Function,
modalClasses: String,
- title: String,
});
import CustomButton from "./CustomButton.vue";