refactor: rename components

This commit is contained in:
Anthony Fu 2022-11-23 10:22:18 +08:00
parent a4d235b6fe
commit df9ee293a7
9 changed files with 11 additions and 2 deletions

View file

@ -0,0 +1,26 @@
<script setup lang="ts">
const { modelValue } = defineModel<{
modelValue: boolean
}>()
const el = ref<HTMLDivElement>()
onClickOutside(el, () => {
if (modelValue)
modelValue.value = false
})
</script>
<template>
<div
v-show="modelValue"
ref="el"
absolute
bg-base
rounded
shadow-xl
dark="border border-base"
>
<slot />
</div>
</template>