From 0ae9d8db6af5bc0ae3172933bddee37f30b3ed49 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Wed, 29 May 2024 20:36:37 -0300 Subject: [PATCH] chore: Refactor ParameterComponent handle button rendering This commit refactors the rendering of the handle button in the ParameterComponent. It improves the readability and maintainability of the code by simplifying the logic and removing unnecessary ternary operators. --- .../components/parameterComponent/index.tsx | 44 ++++++++++--------- src/frontend/src/utils/styleUtils.ts | 2 + 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/frontend/src/customNodes/genericNode/components/parameterComponent/index.tsx b/src/frontend/src/customNodes/genericNode/components/parameterComponent/index.tsx index 33e3d6ddc..3838b6c68 100644 --- a/src/frontend/src/customNodes/genericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/customNodes/genericNode/components/parameterComponent/index.tsx @@ -258,28 +258,30 @@ export default function ParameterComponent({ {title} - - - + + + )} )} diff --git a/src/frontend/src/utils/styleUtils.ts b/src/frontend/src/utils/styleUtils.ts index c73ec5d23..3ac09c8e8 100644 --- a/src/frontend/src/utils/styleUtils.ts +++ b/src/frontend/src/utils/styleUtils.ts @@ -53,6 +53,7 @@ import { FileType2, FileUp, FlaskConical, + ScanEye, FolderIcon, FolderPlus, FolderPlusIcon, @@ -397,6 +398,7 @@ export const nodeIconsLucide: iconsType = { textsplitters: Scissors, wrappers: Gift, helpers: Wand2, + ScanEye, experimental: FlaskConical, langchain_utilities: PocketKnife, WolframAlphaAPIWrapper: SvgWolfram,