Merge pull request #33364 from backstage/rugvip/auth-provider-icon-element

frontend-plugin-api: accept IconElement in AuthProviderInfo
This commit is contained in:
Patrik Oldsberg
2026-03-16 16:10:13 +01:00
committed by GitHub
8 changed files with 44 additions and 15 deletions
+1 -1
View File
@@ -316,7 +316,7 @@ export const atlassianAuthApiRef: ApiRef<
export type AuthProviderInfo = {
id: string;
title: string;
icon: IconComponent;
icon: IconComponent | IconElement;
message?: string;
};
@@ -17,7 +17,7 @@
/* eslint-disable @typescript-eslint/no-redeclare */
import { ApiRef, createApiRef } from '../system';
import { IconComponent } from '../../icons/types';
import { IconComponent, IconElement } from '../../icons/types';
import { Observable } from '@backstage/types';
/**
@@ -54,8 +54,13 @@ export type AuthProviderInfo = {
/**
* Icon for the auth provider.
*
* @remarks
*
* Accepts either an `IconElement` (e.g. `<MyIcon />`) or an `IconComponent`
* (e.g. `MyIcon`). Prefer passing `IconElement`.
*/
icon: IconComponent;
icon: IconComponent | IconElement;
/**
* Optional user friendly messaage to display for the auth provider.