You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by en...@apache.org on 2025/06/16 15:33:24 UTC

(superset) 01/01: fix(BaseIcon): ensure iconSize is parsed correctly when passed as string

This is an automated email from the ASF dual-hosted git repository.

enzomartellucci pushed a commit to branch enxdev/fix/baseIcon
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 04f4dd72a549452e6d090641de8a2ef88463fb45
Author: Enzo Martellucci <en...@gmail.com>
AuthorDate: Mon Jun 16 17:32:30 2025 +0200

    fix(BaseIcon): ensure iconSize is parsed correctly when passed as string
---
 .../packages/superset-ui-core/src/components/Icons/BaseIcon.tsx       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/superset-frontend/packages/superset-ui-core/src/components/Icons/BaseIcon.tsx b/superset-frontend/packages/superset-ui-core/src/components/Icons/BaseIcon.tsx
index 46c4c68905..3eda3b548b 100644
--- a/superset-frontend/packages/superset-ui-core/src/components/Icons/BaseIcon.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/components/Icons/BaseIcon.tsx
@@ -50,7 +50,9 @@ export const BaseIconComponent: React.FC<
   const ariaLabel = genAriaLabel(rest.fileName || '');
   const style = {
     color: iconColor,
-    fontSize: iconSize ? themeObject.getFontSize(iconSize) : theme.fontSize,
+    fontSize: iconSize
+      ? `${themeObject.getFontSize(iconSize)}px`
+      : `${theme.fontSize}px`,
     cursor: rest?.onClick ? 'pointer' : undefined,
   };