diff --git a/src/frontend/src/components/ReactTooltipComponent/index.tsx b/src/frontend/src/components/ReactTooltipComponent/index.tsx index 0f0c64b89..2e3733e2a 100644 --- a/src/frontend/src/components/ReactTooltipComponent/index.tsx +++ b/src/frontend/src/components/ReactTooltipComponent/index.tsx @@ -4,18 +4,7 @@ import React from "react"; import { Tooltip as ReactTooltip } from "react-tooltip"; import "react-tooltip/dist/react-tooltip.css"; import { classNames } from "../../utils/utils"; - -type TooltipProps = { - selector: string; - content?: string; - disabled?: boolean; - htmlContent?: React.ReactNode; - className?: string; // This should use !impornant to override the default styles eg: '!bg-white' - position?: "top" | "right" | "bottom" | "left"; - clickable?: boolean; - children: React.ReactNode; - delayShow?: number; -}; +import { TooltipProps } from "../../types/components"; const TooltipReact: FC = ({ selector, diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index be13ac5e4..e21ca0da2 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -179,3 +179,15 @@ export type InputProps = { setDescription: (description: string) => void; updateFlow: (flow: { id: string; name: string }) => void; }; + +export type TooltipProps = { + selector: string; + content?: string; + disabled?: boolean; + htmlContent?: React.ReactNode; + className?: string; // This should use !impornant to override the default styles eg: '!bg-white' + position?: "top" | "right" | "bottom" | "left"; + clickable?: boolean; + children: React.ReactNode; + delayShow?: number; +};