diff --git a/.changeset/yummy-dolls-tell.md b/.changeset/yummy-dolls-tell.md new file mode 100644 index 000000000..a20e26cd9 --- /dev/null +++ b/.changeset/yummy-dolls-tell.md @@ -0,0 +1,5 @@ +--- +"bits-ui": patch +--- + +fix(Tooltip): expose `strategy` prop diff --git a/packages/bits-ui/src/lib/bits/tooltip/components/tooltip-content.svelte b/packages/bits-ui/src/lib/bits/tooltip/components/tooltip-content.svelte index a589cf69b..93a132d3d 100644 --- a/packages/bits-ui/src/lib/bits/tooltip/components/tooltip-content.svelte +++ b/packages/bits-ui/src/lib/bits/tooltip/components/tooltip-content.svelte @@ -21,6 +21,7 @@ avoidCollisions = true, arrowPadding = 0, sticky = "partial", + strategy, hideWhenDetached = false, collisionPadding = 0, onInteractOutside = noop, @@ -48,6 +49,7 @@ sticky, hideWhenDetached, collisionPadding, + strategy, }); const mergedProps = $derived(mergeProps(restProps, floatingProps, contentState.props)); diff --git a/packages/bits-ui/src/lib/bits/tooltip/types.ts b/packages/bits-ui/src/lib/bits/tooltip/types.ts index 26a9ee594..7a68eaae1 100644 --- a/packages/bits-ui/src/lib/bits/tooltip/types.ts +++ b/packages/bits-ui/src/lib/bits/tooltip/types.ts @@ -121,22 +121,7 @@ export type TooltipRootPropsWithoutHTML = WithChildren<{ export type TooltipRootProps = TooltipRootPropsWithoutHTML; export type TooltipContentPropsWithoutHTML = WithChildNoChildrenSnippetProps< - Pick< - FloatingLayerContentProps, - | "side" - | "sideOffset" - | "align" - | "alignOffset" - | "avoidCollisions" - | "collisionBoundary" - | "collisionPadding" - | "arrowPadding" - | "sticky" - | "hideWhenDetached" - | "updatePositionStrategy" - | "dir" - | "customAnchor" - > & + Omit & Omit & EscapeLayerProps & { /**