-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Popover): allow manual mode without blocking normal behaviour
- Loading branch information
1 parent
3844714
commit 3334e2a
Showing
4 changed files
with
49 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
<script setup> | ||
const open = ref(false) | ||
const open = ref(true) | ||
defineShortcuts({ | ||
o: () => open.value = !open.value | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="flex gap-4 items-center"> | ||
<UToggle v-model="open" /> | ||
<UPopover :open="open"> | ||
<UButton color="white" label="Open" trailing-icon="i-heroicons-chevron-down-20-solid" /> | ||
<UPopover v-model:open="open"> | ||
<UButton color="white" :label="open.toString()" trailing-icon="i-heroicons-chevron-down-20-solid" /> | ||
|
||
<template #panel> | ||
<div class="p-4"> | ||
<Placeholder class="h-20 w-48" /> | ||
</div> | ||
</template> | ||
</UPopover> | ||
</div> | ||
<template #panel> | ||
<div class="p-4"> | ||
<Placeholder class="h-20 w-48" /> | ||
</div> | ||
</template> | ||
</UPopover> | ||
</template> |
18 changes: 8 additions & 10 deletions
18
docs/components/content/examples/PopoverExampleOverlay.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
<template> | ||
<div class="flex gap-4 items-center"> | ||
<UPopover overlay> | ||
<UButton color="white" label="Open" trailing-icon="i-heroicons-chevron-down-20-solid" /> | ||
<UPopover overlay> | ||
<UButton color="white" label="Open" trailing-icon="i-heroicons-chevron-down-20-solid" /> | ||
|
||
<template #panel> | ||
<div class="p-4"> | ||
<Placeholder class="h-20 w-48" /> | ||
</div> | ||
</template> | ||
</UPopover> | ||
</div> | ||
<template #panel> | ||
<div class="p-4"> | ||
<Placeholder class="h-20 w-48" /> | ||
</div> | ||
</template> | ||
</UPopover> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3334e2a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ui – ./
ui-git-dev-nuxt-js.vercel.app
ui-nuxt-js.vercel.app
ui.nuxt.com