frontend-plugin-api: remove defineParams from PluginHeaderActionBlueprint
Replace the defineParams + createExtensionBlueprintParams pattern with inline param types on the factory, matching PageBlueprint, SubPageBlueprint, and other blueprints. Update the app-visualizer usage accordingly. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
```ts
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { IconComponent } from '@backstage/frontend-plugin-api';
|
||||
@@ -124,11 +123,9 @@ const visualizerPlugin: OverridableFrontendPlugin<
|
||||
configInput: {};
|
||||
output: ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>;
|
||||
inputs: {};
|
||||
params: (params: {
|
||||
params: {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
}) => ExtensionBlueprintParams<{
|
||||
loader: () => Promise<JSX.Element>;
|
||||
}>;
|
||||
};
|
||||
}>;
|
||||
'sub-page:app-visualizer/details': OverridableExtensionDefinition<{
|
||||
kind: 'sub-page';
|
||||
|
||||
@@ -76,11 +76,10 @@ const appVisualizerTextPage = SubPageBlueprint.make({
|
||||
});
|
||||
|
||||
const copyTreeAsJson = PluginHeaderActionBlueprint.make({
|
||||
params: defineParams =>
|
||||
defineParams({
|
||||
loader: () =>
|
||||
import('./components/CopyTreeButton').then(m => <m.CopyTreeButton />),
|
||||
}),
|
||||
params: {
|
||||
loader: () =>
|
||||
import('./components/CopyTreeButton').then(m => <m.CopyTreeButton />),
|
||||
},
|
||||
});
|
||||
|
||||
export const appVisualizerNavItem = NavItemBlueprint.make({
|
||||
|
||||
Reference in New Issue
Block a user