Clarify icon sizing rules for NFS icons

Document the IconElement sizing contract, ensure deprecated icon component registrations inherit size correctly, and add changesets for the affected icon migration packages.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-07 18:38:02 +01:00
parent ed8d9ce67c
commit 3f36ce1257
6 changed files with 32 additions and 18 deletions
@@ -38,17 +38,18 @@ export type IconComponent = ComponentType<{
}>;
/**
* The type used for icon elements throughout Backstage. It is recommended to
* use icons from `@remixicon/react`.
* The type used for icon elements throughout Backstage.
*
* @remarks
*
* Icons should be exactly 24x24 pixels in size.
* Icon elements should behave like rendering a plain icon directly, for example
* from `@remixicon/react`, and are expected to be sized by the surrounding UI.
* Icons should be exactly 24x24 pixels in size by default.
*
* Using icons from `@remixicon/react` is preferred, but using icons from
* Using icons from `@remixicon/react` is preferred. Using icons from
* `@material-ui/icons` or `AppIcon` and its variants from
* `@backstage/core-components` is supported but depreceated. When using these
* icons, you must set the `fontSize` to `'inherit'`.
* `@backstage/core-components` is supported while migrating, but deprecated.
* When using those icons, you must set `fontSize="inherit"` on the element.
*
* @public
*/