fix(components): specify collisionPadding to all menus

This commit is contained in:
Benjamin Canac
2024-11-29 16:39:35 +01:00
parent 1240a3b604
commit 148b02464d
6 changed files with 12 additions and 12 deletions

View File

@@ -52,7 +52,7 @@ export interface DropdownMenuProps<T> extends Omit<DropdownMenuRootProps, 'dir'>
loadingIcon?: string
/**
* The content of the menu.
* @defaultValue { side: 'bottom', sideOffset: 8 }
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
*/
content?: Omit<DropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'>
/**
@@ -154,7 +154,7 @@ const emits = defineEmits<DropdownMenuEmits>()
const slots = defineSlots<DropdownMenuSlots<T>>()
const rootProps = useForwardPropsEmits(reactivePick(props, 'defaultOpen', 'open', 'modal'), emits)
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8 }) as DropdownMenuContentProps)
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, collisionPadding: 8 }) as DropdownMenuContentProps)
const arrowProps = toRef(() => props.arrow as DropdownMenuArrowProps)
const proxySlots = omit(slots, ['default']) as Record<string, DropdownMenuSlots<T>[string]>