Skip to content

Commit

Permalink
fix: Dropdown and Popover manual padding
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Apr 12, 2022
1 parent 8bc4902 commit 2e09939
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/pages/examples.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
Popover:
</div>

<UPopover panel-class="w-screen max-w-sm px-4 sm:px-0 transform" wrapper-class="inline-block relative">
<UPopover mode="hover" wrapper-class="inline-block relative">
<template #default="{ open }">
<UButton variant="secondary" :icon="open ? 'heroicons-solid:chevron-up' : 'heroicons-solid:chevron-down'" trailing icon-class="transition">
Open popover!
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/elements/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default {
modifiers: [{
name: 'offset',
options: {
offset: [0, 8]
offset: 0
}
},
{
Expand Down Expand Up @@ -221,7 +221,7 @@ export default {
closeTimeout = closeTimeout || setTimeout(() => {
menuApi.value.closeMenu && menuApi.value.closeMenu()
closeTimeout = null
}, 200)
}, 0)
}
return {
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/components/overlays/Popover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default {
},
containerClass: {
type: String,
default: 'z-10'
default: 'z-10 py-2'
},
panelClass: {
type: String,
Expand All @@ -72,7 +72,7 @@ export default {
modifiers: [{
name: 'offset',
options: {
offset: [0, 8]
offset: 0
}
},
{
Expand Down Expand Up @@ -144,7 +144,7 @@ export default {
closeTimeout = closeTimeout || setTimeout(() => {
popoverApi.value.closePopover && popoverApi.value.closePopover()
closeTimeout = null
}, 200)
}, 0)
}
return {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/presets/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ const alertDialog = {

const dropdown = {
wrapper: 'relative inline-flex text-left',
container: 'w-48 z-20',
container: 'w-48 z-20 py-2',
base: 'u-bg-white divide-y u-divide-gray-100 rounded-md ring-1 u-ring-gray-200 shadow-lg',
item: {
base: 'group flex items-center gap-3 px-4 py-2 text-sm w-full',
Expand Down

1 comment on commit 2e09939

@vercel
Copy link

@vercel vercel bot commented on 2e09939 Apr 12, 2022

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-nuxtlabs.vercel.app
nuxthq-ui.vercel.app
ui-git-dev-nuxtlabs.vercel.app

Please sign in to comment.