Skip to content

Commit 0cb2561

Browse files
authored
fix(Tooltip): expose strategy prop (#1780)
1 parent 43c7345 commit 0cb2561

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

.changeset/yummy-dolls-tell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"bits-ui": patch
3+
---
4+
5+
fix(Tooltip): expose `strategy` prop

packages/bits-ui/src/lib/bits/tooltip/components/tooltip-content.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
avoidCollisions = true,
2222
arrowPadding = 0,
2323
sticky = "partial",
24+
strategy,
2425
hideWhenDetached = false,
2526
collisionPadding = 0,
2627
onInteractOutside = noop,
@@ -48,6 +49,7 @@
4849
sticky,
4950
hideWhenDetached,
5051
collisionPadding,
52+
strategy,
5153
});
5254
5355
const mergedProps = $derived(mergeProps(restProps, floatingProps, contentState.props));

packages/bits-ui/src/lib/bits/tooltip/types.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,7 @@ export type TooltipRootPropsWithoutHTML = WithChildren<{
121121
export type TooltipRootProps = TooltipRootPropsWithoutHTML;
122122

123123
export type TooltipContentPropsWithoutHTML = WithChildNoChildrenSnippetProps<
124-
Pick<
125-
FloatingLayerContentProps,
126-
| "side"
127-
| "sideOffset"
128-
| "align"
129-
| "alignOffset"
130-
| "avoidCollisions"
131-
| "collisionBoundary"
132-
| "collisionPadding"
133-
| "arrowPadding"
134-
| "sticky"
135-
| "hideWhenDetached"
136-
| "updatePositionStrategy"
137-
| "dir"
138-
| "customAnchor"
139-
> &
124+
Omit<FloatingLayerContentProps, "content" | "preventScroll"> &
140125
Omit<DismissibleLayerProps, "onInteractOutsideStart"> &
141126
EscapeLayerProps & {
142127
/**

0 commit comments

Comments
 (0)