diff --git a/frontend/src/components/shared/ToolIcon.tsx b/frontend/src/components/shared/ToolIcon.tsx new file mode 100644 index 000000000..75ab249ba --- /dev/null +++ b/frontend/src/components/shared/ToolIcon.tsx @@ -0,0 +1,34 @@ +import React from "react"; + +interface ToolIconProps { + icon: React.ReactNode; + opacity?: number; + color?: string; + marginRight?: string; +} + +/** + * Shared icon component for consistent tool icon styling across the application. + * Uses the same visual pattern as ToolButton: scaled to 0.8, centered transform, consistent spacing. + */ +export const ToolIcon: React.FC = ({ + icon, + opacity = 1, + color = "var(--tools-text-and-icon-color)", + marginRight = "0.5rem" +}) => { + return ( +
+ {icon} +
+ ); +}; diff --git a/frontend/src/components/tools/automate/AutomationEntry.tsx b/frontend/src/components/tools/automate/AutomationEntry.tsx index 30c280491..23db33ea6 100644 --- a/frontend/src/components/tools/automate/AutomationEntry.tsx +++ b/frontend/src/components/tools/automate/AutomationEntry.tsx @@ -6,6 +6,7 @@ import EditIcon from '@mui/icons-material/Edit'; import DeleteIcon from '@mui/icons-material/Delete'; import ContentCopyIcon from '@mui/icons-material/ContentCopy'; import { Tooltip } from '../../shared/Tooltip'; +import { ToolIcon } from '../../shared/ToolIcon'; import { ToolRegistryEntry } from '../../../data/toolsTaxonomy'; interface AutomationEntryProps { @@ -114,10 +115,9 @@ export default function AutomationEntry({ return ( {BadgeIcon && ( - } + color={keepIconColor ? 'var(--mantine-primary-color-filled)' : 'var(--mantine-color-text)'} /> )} @@ -130,10 +130,9 @@ export default function AutomationEntry({ return ( {BadgeIcon && ( - } + color={keepIconColor ? 'var(--mantine-primary-color-filled)' : 'var(--mantine-color-text)'} /> )} diff --git a/frontend/src/components/tools/shared/SuggestedToolsSection.tsx b/frontend/src/components/tools/shared/SuggestedToolsSection.tsx index 18cf8a0d5..ad8720f19 100644 --- a/frontend/src/components/tools/shared/SuggestedToolsSection.tsx +++ b/frontend/src/components/tools/shared/SuggestedToolsSection.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { Stack, Text, Divider, Card, Group, Anchor } from '@mantine/core'; import { useTranslation } from 'react-i18next'; import { useSuggestedTools } from '../../../hooks/useSuggestedTools'; +import { ToolIcon } from '../../shared/ToolIcon'; export function SuggestedToolsSection(): React.ReactElement { const { t } = useTranslation(); @@ -31,7 +32,7 @@ export function SuggestedToolsSection(): React.ReactElement { style={{ cursor: 'pointer' }} > - + } /> {tool.title}