Skip to content

Commit

Permalink
feat: imperative mode place option
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljablonski committed Nov 1, 2023
1 parent 5b64278 commit d07bc9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const Tooltip = ({
},
} as Element
computeTooltipPosition({
place,
place: imperativeOptions?.place ?? place,
offset,
elementReference: virtualElement,
tooltipReference: tooltipRef.current,
Expand Down Expand Up @@ -328,7 +328,7 @@ const Tooltip = ({
}

computeTooltipPosition({
place,
place: imperativeOptions?.place ?? place,
offset,
elementReference: activeAnchor,
tooltipReference: tooltipRef.current,
Expand All @@ -355,6 +355,7 @@ const Tooltip = ({
content,
externalStyles,
place,
imperativeOptions?.place,
offset,
positionStrategy,
position,
Expand Down
1 change: 1 addition & 0 deletions src/components/Tooltip/TooltipTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export interface IPosition {
export interface TooltipImperativeOpenOptions {
anchorSelect?: string
position?: IPosition
place?: PlacesType
content?: ChildrenType
}

Expand Down

0 comments on commit d07bc9b

Please sign in to comment.