diff --git a/src/frontend/src/components/ShadTooltipComponent/index.tsx b/src/frontend/src/components/ShadTooltipComponent/index.tsx index 44ffac075..aa31b534b 100644 --- a/src/frontend/src/components/ShadTooltipComponent/index.tsx +++ b/src/frontend/src/components/ShadTooltipComponent/index.tsx @@ -1,3 +1,4 @@ +import { ShadTooltipProps } from "../../types/components"; import { Tooltip, TooltipContent, @@ -5,18 +6,19 @@ import { TooltipTrigger, } from "../ui/tooltip"; -const ShadTooltip = (props) => { +const ShadTooltip = ({ + delayDuration = 500, + side, + content, + children, +}: ShadTooltipProps) => { return ( - - {props.children} + + {children} - - {props.content} + + {content} diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index b1570ddda..2ac6960fd 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -110,3 +110,12 @@ export type RadialProgressType = { value?: number; color?: string; }; + +export type Side = "top" | "right" | "bottom" | "left"; + +export type ShadTooltipProps = { + delayDuration?: number; + side?: Side; + content: ReactNode; + children: ReactNode; +};