Fix large icon rendering in catalog graph nodes (#32208)

Signed-off-by: hiirrxnn <hiren2004sharma@gmail.com>
This commit is contained in:
Hiren Sharma
2026-02-03 19:46:29 +05:30
committed by GitHub
parent bacd268069
commit 8dd27c42e2
2 changed files with 15 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-graph': patch
---
Fix large icon rendering in catalog graph nodes
@@ -20,6 +20,8 @@ import { IconComponent } from '@backstage/core-plugin-api';
export function EntityIcon({
icon,
width,
height,
...props
}: {
icon: IconComponent | undefined;
@@ -30,5 +32,12 @@ export function EntityIcon({
className?: string;
}) {
const Icon = (icon as OverridableComponent<SvgIconTypeMap>) ?? SvgIcon;
return <Icon {...props} />;
return (
<Icon
style={{ width, height, fontSize: height }}
width={width}
height={height}
{...props}
/>
);
}