diff --git a/src/Tooltip/Tooltip.story.tsx b/src/Tooltip/Tooltip.story.tsx
index 326b632b2..3701ee69c 100644
--- a/src/Tooltip/Tooltip.story.tsx
+++ b/src/Tooltip/Tooltip.story.tsx
@@ -1,6 +1,5 @@
import React from "react";
import { Button, Box, Link, Flex, Text, Tooltip } from "../index";
-import styled from "styled-components";
export default {
title: "Components/Tooltip",
@@ -187,6 +186,16 @@ export const WithCustomComponent = () => (
);
+export const WithRef = () => {
+ const ref = React.useRef(null);
+
+ return (
+
+
+
+ );
+};
+
const CustomComponent = React.forwardRef((props, forwardedRef) => (
This component uses the forwardedRef from the Tooltip wrapping it
diff --git a/src/Tooltip/Tooltip.tsx b/src/Tooltip/Tooltip.tsx
index 1cc206789..cb269421a 100644
--- a/src/Tooltip/Tooltip.tsx
+++ b/src/Tooltip/Tooltip.tsx
@@ -1,4 +1,4 @@
-import React, { LegacyRef } from "react";
+import React from "react";
import { Popper } from "../Popper";
import { generateId } from "../utils";
import TooltipContainer from "./TooltipContainer";