Fix field action icon prop leakage
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user