feat(Dropdown): handle manual mode

Resolves #1143
This commit is contained in:
Benjamin Canac
2024-01-03 16:49:00 +01:00
parent 84e6392981
commit 3844714644
3 changed files with 65 additions and 11 deletions

View File

@@ -0,0 +1,22 @@
<script setup>
const items = [
[{
label: 'Profile',
avatar: {
src: 'https://avatars.githubusercontent.com/u/739984?v=4'
}
}]
]
const open = ref(true)
defineShortcuts({
o: () => open.value = !open.value
})
</script>
<template>
<UDropdown v-model:open="open" :items="items" :popper="{ placement: 'bottom-start' }">
<UButton color="white" label="Options" trailing-icon="i-heroicons-chevron-down-20-solid" />
</UDropdown>
</template>