From 18b7da5ef7b4ee37ee2dc81ffe8ef3dfe9529edc Mon Sep 17 00:00:00 2001
From: Leonardo Christino <leomilho@gmail.com>
Date: Wed, 9 Aug 2023 15:42:57 +0200
Subject: [PATCH] feat(css): update icons of query panel logic menu

---
 .../shared/lib/querybuilder/model/logic/numberFilters.tsx | 8 ++++----
 .../lib/querybuilder/model/logic/numberFunctions.tsx      | 4 ++--
 libs/shared/lib/querybuilder/panel/querysidepanel.tsx     | 6 +++++-
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/libs/shared/lib/querybuilder/model/logic/numberFilters.tsx b/libs/shared/lib/querybuilder/model/logic/numberFilters.tsx
index 8d8d58a93..b54336f44 100644
--- a/libs/shared/lib/querybuilder/model/logic/numberFilters.tsx
+++ b/libs/shared/lib/querybuilder/model/logic/numberFilters.tsx
@@ -20,7 +20,7 @@ export const MathFilters: Record<NumberFilterTypes, GeneralDescription<NumberFil
     ],
     output: { name: '==', type: 'float' },
     logic: ['==', '@1', '@2'],
-    icon: '==',
+    icon: '=',
   },
   [NumberFilterTypes.NOT_EQUAL]: {
     key: 'numberFilterNotEqual',
@@ -34,7 +34,7 @@ export const MathFilters: Record<NumberFilterTypes, GeneralDescription<NumberFil
     ],
     output: { name: '!=', type: 'float' },
     logic: ['!=', '@1', '@2'],
-    icon: '!=',
+    icon: '≠',
   },
   [NumberFilterTypes.LESS_THAN]: {
     key: 'numberFilterLessThan',
@@ -62,7 +62,7 @@ export const MathFilters: Record<NumberFilterTypes, GeneralDescription<NumberFil
     ],
     output: { name: '<=', type: 'float' },
     logic: ['<=', '@1', '@2'],
-    icon: '<=',
+    icon: '≤',
   },
   [NumberFilterTypes.GREATER_THAN]: {
     key: 'numberFilterGreaterThan',
@@ -91,7 +91,7 @@ export const MathFilters: Record<NumberFilterTypes, GeneralDescription<NumberFil
     ],
     output: { name: '>=', type: 'float' },
     logic: ['>=', '@1', '@2'],
-    icon: '>=',
+    icon: '≥',
   },
 };
 
diff --git a/libs/shared/lib/querybuilder/model/logic/numberFunctions.tsx b/libs/shared/lib/querybuilder/model/logic/numberFunctions.tsx
index cbedb1c03..25d6c6899 100644
--- a/libs/shared/lib/querybuilder/model/logic/numberFunctions.tsx
+++ b/libs/shared/lib/querybuilder/model/logic/numberFunctions.tsx
@@ -48,7 +48,7 @@ export const NumberFunctions: Record<NumberFunctionTypes, GeneralDescription<Num
     ],
     output: { name: '*', type: 'float' },
     logic: ['*', '@1', '@2'],
-    icon: '*',
+    icon: '×',
   },
   [NumberFunctionTypes.DIVIDE]: {
     key: 'numberFunctionDivide',
@@ -63,7 +63,7 @@ export const NumberFunctions: Record<NumberFunctionTypes, GeneralDescription<Num
     ],
     output: { name: '/', type: 'float' },
     logic: ['/', '@1', '@2'],
-    icon: '/',
+    icon: '÷',
   },
 };
 
diff --git a/libs/shared/lib/querybuilder/panel/querysidepanel.tsx b/libs/shared/lib/querybuilder/panel/querysidepanel.tsx
index 186cd30de..1ce5fc49b 100644
--- a/libs/shared/lib/querybuilder/panel/querysidepanel.tsx
+++ b/libs/shared/lib/querybuilder/panel/querysidepanel.tsx
@@ -102,7 +102,11 @@ export const QuerySidePanel = (props: {
                     if (!props.draggable && props?.onClick) props.onClick(item);
                   }}
                 >
-                  {item.icon && <span className="w-min">{item.icon}</span>}
+                  {item.icon && (
+                    <div className="w-[1rem] rounded-sm justify-center flex">
+                      <span>{item.icon}</span>
+                    </div>
+                  )}
                   <span className="w-full">{item.name}</span>
                   <span className="flex scale-75">
                     {item.key.toLowerCase().includes('filter') && <FilterAltIcon fontSize="small" />}
-- 
GitLab