From 420bf4ba4dc403ac512bac099bc566ed7fa0bd4b Mon Sep 17 00:00:00 2001 From: igorrCarvalho Date: Mon, 10 Jun 2024 20:32:45 -0300 Subject: [PATCH] Refactor: Decrease visual shortcut font size --- .../components/renderIconComponent/index.tsx | 18 +++++++++--------- .../components/nodeToolbarComponent/index.tsx | 4 ++-- .../toolbarSelectItem/index.tsx | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/frontend/src/components/renderIconComponent/index.tsx b/src/frontend/src/components/renderIconComponent/index.tsx index 241566f93..39b1e7908 100644 --- a/src/frontend/src/components/renderIconComponent/index.tsx +++ b/src/frontend/src/components/renderIconComponent/index.tsx @@ -12,35 +12,35 @@ export default function RenderIcons({ shortcutWPlus: string[]; }): JSX.Element { return hasShift ? ( - <> + {isMac ? ( - + ) : ( filteredShortcut[0] )} - + {filteredShortcut.map((key, idx) => { if (idx > 0) { - return {key.toUpperCase()} ; + return {key.toUpperCase()} ; } })} - + ) : ( - <> + {shortcutWPlus[0].toLowerCase() === "space" ? ( "Space" ) : shortcutWPlus[0].length <= 1 ? ( shortcutWPlus[0] ) : isMac ? ( - + ) : ( shortcutWPlus[0] )} {shortcutWPlus.map((key, idx) => { if (idx > 0) { - return {key.toUpperCase()} ; + return {key.toUpperCase()} ; } })} - + ); } diff --git a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx index 49636c4cb..5077e9318 100644 --- a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx @@ -352,7 +352,7 @@ export default function NodeToolbarComponent({
{name} {" "} Delete{" "} !key.toLowerCase().includes("shift") + (key) => !key.toLowerCase().includes("shift"), ); let shortcutWPlus: string[] = []; if (!hasShift) shortcutWPlus = filteredShortcut.join("+").split(" "); @@ -38,7 +38,7 @@ export default function ToolbarSelectItem({ {value}