frontend-plugin-api: migration to IconElement + API reports

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-02-11 22:02:28 +01:00
parent c47f8402b9
commit abd0a5ad52
30 changed files with 260 additions and 100 deletions
@@ -14,14 +14,14 @@
* limitations under the License.
*/
import { IconComponent } from '@backstage/frontend-plugin-api';
import { IconComponent, IconElement } from '@backstage/frontend-plugin-api';
import {
createExtensionBlueprint,
createExtensionDataRef,
} from '@backstage/frontend-plugin-api';
const iconsDataRef = createExtensionDataRef<{
[key in string]: IconComponent;
[key in string]: IconComponent | IconElement;
}>().with({ id: 'core.icons' });
/**
@@ -33,9 +33,9 @@ export const IconBundleBlueprint = createExtensionBlueprint({
kind: 'icon-bundle',
attachTo: { id: 'api:app/icons', input: 'icons' },
output: [iconsDataRef],
factory: (params: { icons: { [key in string]: IconComponent } }) => [
iconsDataRef(params.icons),
],
factory: (params: {
icons: { [key in string]: IconComponent | IconElement };
}) => [iconsDataRef(params.icons)],
dataRefs: {
icons: iconsDataRef,
},