Continue frontend building
This commit is contained in:
19
packages/sshecret-frontend/src/components/common/Drawer.vue
Normal file
19
packages/sshecret-frontend/src/components/common/Drawer.vue
Normal file
@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<sl-drawer ref="drawerRef" :open="open" @sl-hide="handleHide" :label="label">
|
||||
<slot />
|
||||
</sl-drawer>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { useBubbleSafeHandler } from '@/composables/useBubbleSafeHandler'
|
||||
|
||||
const props = defineProps<{ label: string; open: boolean }>()
|
||||
|
||||
const emit = defineEmits<{ (e: 'hide'): void }>()
|
||||
const drawerRef = ref<HTMLSlDrawerElement>()
|
||||
|
||||
const handleHide = useBubbleSafeHandler(drawerRef, () => {
|
||||
emit('hide')
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user