diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index c5949ed9d..7f5140642 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -28,11 +28,13 @@ export default function GenericNode({ const { setErrorData } = useContext(alertContext); const showError = useRef(true); const { types, deleteNode } = useContext(typesContext); - + const { closePopUp, openPopUp } = useContext(PopUpContext); // any to avoid type conflict const Icon: any = nodeIconsLucide[data.type] || nodeIconsLucide[types[data.type]]; + console.log({ data, Icon, types: data.type || types[data.type], color: nodeColors[types[data.type]] }) + const name = nodeIconsLucide[data.type] ? data.type : types[data.type] const [validationStatus, setValidationStatus] = useState(null); // State for outline color const { sseData, isBuilding } = useSSE(); @@ -86,12 +88,11 @@ export default function GenericNode({ >
-
diff --git a/src/frontend/src/components/genericIconComponent/index.tsx b/src/frontend/src/components/genericIconComponent/index.tsx index ea7850e77..e38807261 100644 --- a/src/frontend/src/components/genericIconComponent/index.tsx +++ b/src/frontend/src/components/genericIconComponent/index.tsx @@ -4,14 +4,16 @@ import { nodeIconsLucide, svgIcons } from "../../utils"; export function IconFromLucide({ name, style, + iconColor, }: IconProps): JSX.Element { const TargetIcon = nodeIconsLucide[name] ?? nodeIconsLucide["unknown"]; - return ; + return ; } export function IconFromSvg({ name, - style + style, + iconColor, }: IconProps): JSX.Element { const TargetSvg = svgIcons[name] ?? nodeIconsLucide["unknown"]; return ; @@ -21,12 +23,13 @@ export default function IconComponent({ method, name, style, + iconColor, }: IconComponentProps): JSX.Element { switch (method) { case "SVG": - return ; + return ; case "LUCIDE": - return ; + return ; default: console.error("IconComponent: invalid method"); return ; diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index 973837d35..d61935176 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -165,10 +165,12 @@ export interface IVarHighlightType { export type IconProps = { name: string; style: string; + iconColor?: string; }; export type IconComponentProps = { method: "SVG" | "LUCIDE"; name: string; style: string; + iconColor?: string; }; diff --git a/src/frontend/src/utils.ts b/src/frontend/src/utils.ts index f36334089..acfcd3c03 100644 --- a/src/frontend/src/utils.ts +++ b/src/frontend/src/utils.ts @@ -136,7 +136,7 @@ export enum TypeModal { } export const svgIcons = { - Airbyte: SvgAirbyte, + /* Airbyte: SvgAirbyte, Anthropic: SvgAnthropicBox, Bing: SvgBing, Chroma: SvgChroma, @@ -165,7 +165,7 @@ export const svgIcons = { Weaviate: SvgWeaviate, Wikipedia: SvgWikipedia, Wolfram: SvgWolfram, - Word: SvgWord, + Word: SvgWord, */ }; export const textColors = {