diff --git a/frontend/src/components/shared/Tooltip.tsx b/frontend/src/components/shared/Tooltip.tsx index 6deda77c4..e42f92083 100644 --- a/frontend/src/components/shared/Tooltip.tsx +++ b/frontend/src/components/shared/Tooltip.tsx @@ -2,7 +2,8 @@ import React, { useState, useRef, useEffect } from 'react'; import { createPortal } from 'react-dom'; import { isClickOutside, addEventListenerWithCleanup } from '../../utils/genericUtils'; import { useTooltipPosition } from '../../hooks/useTooltipPosition'; -import { TooltipContent, TooltipTip } from './tooltip/TooltipContent'; +import { TooltipTip } from '../../types/tips'; +import { TooltipContent } from './tooltip/TooltipContent'; import { useSidebarContext } from '../../contexts/SidebarContext'; import styles from './tooltip/Tooltip.module.css' diff --git a/frontend/src/components/shared/tooltip/TooltipContent.tsx b/frontend/src/components/shared/tooltip/TooltipContent.tsx index e3515e0e6..0e347cd1c 100644 --- a/frontend/src/components/shared/tooltip/TooltipContent.tsx +++ b/frontend/src/components/shared/tooltip/TooltipContent.tsx @@ -1,12 +1,6 @@ import React from 'react'; import styles from './Tooltip.module.css'; - -export interface TooltipTip { - title?: string; - description?: string; - bullets?: string[]; - body?: React.ReactNode; -} +import { TooltipTip } from '../../../types/tips'; interface TooltipContentProps { content?: React.ReactNode; diff --git a/frontend/src/components/tools/shared/ToolStep.tsx b/frontend/src/components/tools/shared/ToolStep.tsx index bda493e88..927180038 100644 --- a/frontend/src/components/tools/shared/ToolStep.tsx +++ b/frontend/src/components/tools/shared/ToolStep.tsx @@ -3,7 +3,7 @@ import { Text, Stack, Box, Flex, Divider } from '@mantine/core'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import ChevronRightIcon from '@mui/icons-material/ChevronRight'; import { Tooltip } from '../../shared/Tooltip'; -import { TooltipTip } from '../../shared/tooltip/TooltipContent'; +import { TooltipTip } from '../../../types/tips'; import { createFilesToolStep, FilesToolStepProps } from './FilesToolStep'; import { createReviewToolStep, ReviewToolStepProps } from './ReviewToolStep'; diff --git a/frontend/src/types/tips.ts b/frontend/src/types/tips.ts index 58519e114..5bcd767d7 100644 --- a/frontend/src/types/tips.ts +++ b/frontend/src/types/tips.ts @@ -1,13 +1,15 @@ +export interface TooltipTip { + title?: string; + description?: string; + bullets?: string[]; + body?: React.ReactNode; +} + export interface TooltipContent { header?: { title: string; logo?: string | React.ReactNode; }; - tips?: Array<{ - title?: string; - description?: string; - bullets?: string[]; - body?: React.ReactNode; - }>; + tips?: TooltipTip[]; content?: React.ReactNode; } \ No newline at end of file