2022-12-11 19:52:36 +09:00
|
|
|
<script lang="ts" setup>
|
2023-01-02 07:06:27 +09:00
|
|
|
const emit = defineEmits<{
|
2022-12-11 19:52:36 +09:00
|
|
|
(event: 'close'): void
|
|
|
|
}>()
|
2023-01-07 00:46:36 +09:00
|
|
|
const { modelValue: visible } = defineModel<{
|
|
|
|
modelValue?: boolean
|
|
|
|
}>()
|
2022-12-11 19:52:36 +09:00
|
|
|
|
|
|
|
function close() {
|
2023-01-02 07:06:27 +09:00
|
|
|
emit('close')
|
2022-12-11 19:52:36 +09:00
|
|
|
visible.value = false
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
flex="~ gap-2" justify-between items-center
|
2022-12-28 07:18:16 +09:00
|
|
|
border="b base" text-sm text-secondary px4 py2 sm:py4
|
2022-12-11 19:52:36 +09:00
|
|
|
>
|
|
|
|
<div>
|
|
|
|
<slot />
|
|
|
|
</div>
|
2023-01-12 18:40:49 +09:00
|
|
|
<button text-xl hover:text-primary bg-hover-overflow w="1.2em" h="1.2em" @click="close()">
|
2022-12-11 19:52:36 +09:00
|
|
|
<div i-ri:close-line />
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</template>
|