Updates based on initial feedback
Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>
This commit is contained in:
@@ -3,4 +3,4 @@
|
||||
'@backstage/core-plugin-api': patch
|
||||
---
|
||||
|
||||
Added `getSystemIcons()` function to the `AppManager` that will pull a list of all the icons that have been registered in the App.
|
||||
Added `getSystemIcons()` function to the `AppContext` available through `useApp` that will pull a list of all the icons that have been registered in the App.
|
||||
|
||||
@@ -157,9 +157,7 @@ export type AppConfigLoader = () => Promise<AppConfig[]>;
|
||||
export type AppContext = {
|
||||
getPlugins(): BackstagePlugin[];
|
||||
getSystemIcon(key: string): IconComponent | undefined;
|
||||
getSystemIcons(): AppIcons & {
|
||||
[key in string]: IconComponent;
|
||||
};
|
||||
getSystemIcons(): Record<string, IconComponent>;
|
||||
getComponents(): AppComponents;
|
||||
};
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ import {
|
||||
AppComponents,
|
||||
AppConfigLoader,
|
||||
AppContext,
|
||||
AppIcons,
|
||||
AppOptions,
|
||||
BackstageApp,
|
||||
SignInPageProps,
|
||||
@@ -154,7 +153,7 @@ class AppContextImpl implements AppContext {
|
||||
return this.app.getSystemIcon(key);
|
||||
}
|
||||
|
||||
getSystemIcons(): AppIcons & { [key in string]: IconComponent } {
|
||||
getSystemIcons(): Record<string, IconComponent> {
|
||||
return this.app.getSystemIcons();
|
||||
}
|
||||
|
||||
@@ -199,7 +198,7 @@ export class AppManager implements BackstageApp {
|
||||
return this.icons[key];
|
||||
}
|
||||
|
||||
getSystemIcons(): AppIcons & { [key in string]: IconComponent } {
|
||||
getSystemIcons(): Record<string, IconComponent> {
|
||||
return this.icons;
|
||||
}
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ export type AppContext = {
|
||||
/**
|
||||
* Get a list of common and custom icons for this app.
|
||||
*/
|
||||
getSystemIcons(): AppIcons & { [key in string]: IconComponent };
|
||||
getSystemIcons(): Record<string, IconComponent>;
|
||||
|
||||
/**
|
||||
* Get the components registered for various purposes in the app.
|
||||
|
||||
@@ -149,37 +149,10 @@ export type AppComponents = {
|
||||
export type AppContext = {
|
||||
getPlugins(): BackstagePlugin_2[];
|
||||
getSystemIcon(key: string): IconComponent_2 | undefined;
|
||||
getSystemIcons(): AppIcons & {
|
||||
[key in string]: IconComponent_2;
|
||||
};
|
||||
getSystemIcons(): Record<string, IconComponent_2>;
|
||||
getComponents(): AppComponents;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type AppIcons = {
|
||||
'kind:api': IconComponent_2;
|
||||
'kind:component': IconComponent_2;
|
||||
'kind:domain': IconComponent_2;
|
||||
'kind:group': IconComponent_2;
|
||||
'kind:location': IconComponent_2;
|
||||
'kind:system': IconComponent_2;
|
||||
'kind:user': IconComponent_2;
|
||||
brokenImage: IconComponent_2;
|
||||
catalog: IconComponent_2;
|
||||
chat: IconComponent_2;
|
||||
dashboard: IconComponent_2;
|
||||
docs: IconComponent_2;
|
||||
email: IconComponent_2;
|
||||
github: IconComponent_2;
|
||||
group: IconComponent_2;
|
||||
help: IconComponent_2;
|
||||
scaffolder: IconComponent_2;
|
||||
search: IconComponent_2;
|
||||
techdocs: IconComponent_2;
|
||||
user: IconComponent_2;
|
||||
warning: IconComponent_2;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type AppTheme = {
|
||||
id: string;
|
||||
|
||||
@@ -24,5 +24,4 @@ export type {
|
||||
ErrorBoundaryFallbackProps,
|
||||
AppComponents,
|
||||
AppContext,
|
||||
AppIcons,
|
||||
} from '../../../core-app-api/src/app/types';
|
||||
|
||||
Reference in New Issue
Block a user