a bunch of bug fixes and improvements
This commit is contained in:
25
components/Modal.vue
Normal file
25
components/Modal.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<Teleport to="body">
|
||||
<div
|
||||
v-if="opened"
|
||||
class="absolute z-10 top-0 bottom-0 left-0 right-0"
|
||||
>
|
||||
<slot />
|
||||
<div
|
||||
class="bg-black/70 w-screen h-screen"
|
||||
@click="$emit('close')"
|
||||
/>
|
||||
</div>
|
||||
</Teleport>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineEmits(['close']);
|
||||
|
||||
defineProps({
|
||||
opened: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user