Skip to content

Commit

Permalink
fixup! Feat(web): Introduce new TooltipModern component with FloatingUI
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelklibani committed Jan 17, 2024
1 parent 4a9136d commit c48887b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/web-react/src/components/Tooltip/useFloatingUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const useFloatingUI = (props: UseTooltipUIProps) => {
placement: tooltipPlacement,
whileElementsMounted: autoUpdate,
middleware: [
offset(0), // TODO: how to set css variable here? (--tooltip-offset), do i need it? - not sure yet
offset(8), // TODO: how to set css variable here? (--tooltip-offset)
inline(),
flipProp &&
flip({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const TooltipWithFloatingUI = () => {
}, []);

return (
<>
<div className="spirit-feature-tooltip-enable-data-placement">
<p>
The following example is using external library <a href="https://floating-ui.com">Floating UI</a>.
</p>
Expand Down Expand Up @@ -126,7 +126,7 @@ const TooltipWithFloatingUI = () => {
</TooltipModern>
</div>
</div>
</>
</div>
);
};

Expand Down

0 comments on commit c48887b

Please sign in to comment.