mirror of
https://github.com/elk-zone/elk.git
synced 2024-12-21 12:14:33 +03:00
b30ebc12f8
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
27 lines
553 B
Vue
27 lines
553 B
Vue
<script lang="ts" setup>
|
|
const emit = defineEmits<{
|
|
(event: 'close'): void
|
|
}>()
|
|
const { modelValue: visible } = defineModel<{
|
|
modelValue?: boolean
|
|
}>()
|
|
|
|
function close() {
|
|
emit('close')
|
|
visible.value = false
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
flex="~ gap-2" justify-between items-center
|
|
border="b base" text-sm text-secondary px4 py2 sm:py4
|
|
>
|
|
<div>
|
|
<slot />
|
|
</div>
|
|
<button text-xl hover:text-primary bg-hover-overflow w="1.4em" h="1.4em" @click="close()">
|
|
<div i-ri:close-line />
|
|
</button>
|
|
</div>
|
|
</template>
|