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

@@ -18,7 +18,7 @@ export interface TooltipProps extends TooltipRootProps {
kbds?: KbdProps['value'][] | KbdProps[]
/**
* The content of the tooltip.
* @defaultValue { side: 'bottom', sideOffset: 8 }
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
*/
content?: Omit<TooltipContentProps, 'as' | 'asChild'>
/**
@@ -59,7 +59,7 @@ const emits = defineEmits<TooltipEmits>()
const slots = defineSlots<TooltipSlots>()
const rootProps = useForwardPropsEmits(reactivePick(props, 'defaultOpen', 'open', 'delayDuration', 'disableHoverableContent', 'disableClosingTrigger', 'disabled', 'ignoreNonKeyboardFocus'), emits)
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8 }) as TooltipContentProps)
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, collisionPadding: 8 }) as TooltipContentProps)
const arrowProps = toRef(() => props.arrow as TooltipArrowProps)
// eslint-disable-next-line vue/no-dupe-keys