Fix field action icon prop leakage

This commit is contained in:
Amer Agovic
2026-05-09 06:50:30 -05:00
parent ff515fddf6
commit 08f277486a
+2 -2
View File
@@ -101,12 +101,12 @@ function renderActionNode(action, context, fallbackColor = '$textMuted') {
if (typeof action === 'string') { if (typeof action === 'string') {
const IconComponent = getIcon(action); const IconComponent = getIcon(action);
return IconComponent ? <IconComponent size="sm" color={fallbackColor} {...context} /> : null; return IconComponent ? <IconComponent size="sm" color={fallbackColor} /> : null;
} }
if (action && typeof action === 'object' && action.icon) { if (action && typeof action === 'object' && action.icon) {
const IconComponent = typeof action.icon === 'string' ? getIcon(action.icon) : action.icon; const IconComponent = typeof action.icon === 'string' ? getIcon(action.icon) : action.icon;
return IconComponent ? <IconComponent size="sm" color={action.color || fallbackColor} weight={action.weight} {...context} /> : null; return IconComponent ? <IconComponent size="sm" color={action.color || fallbackColor} weight={action.weight} /> : null;
} }
return null; return null;