frontend-plugin-api: AppRootElementBlueprint now only accepts an element
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-app': minor
|
||||
---
|
||||
|
||||
**BREAKING**: The `app-root-element` extension now only accepts `JSX.Element` in its `element` param, meaning overrides need to be updated.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/frontend-plugin-api': minor
|
||||
---
|
||||
|
||||
**BREAKING**: The `element` param for `AppRootElementBlueprint` no longer accepts a component. If you are currently passing a component such as `element: () => <MyComponent />` or `element: MyComponent`, simply switch to `element: <MyComponent />`.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-signals': patch
|
||||
'@backstage/plugin-home': patch
|
||||
---
|
||||
|
||||
**BREAKING ALPHA**: The `app-root-element` extension now only accepts `JSX.Element` in its `element` param, meaning overrides need to be updated.
|
||||
@@ -254,7 +254,7 @@ export const AppRootElementBlueprint: ExtensionBlueprint<{
|
||||
kind: 'app-root-element';
|
||||
name: undefined;
|
||||
params: {
|
||||
element: JSX.Element | (() => JSX.Element);
|
||||
element: JSX.Element;
|
||||
};
|
||||
output: ConfigurableExtensionDataRef<JSX_3.Element, 'core.reactElement', {}>;
|
||||
inputs: {};
|
||||
|
||||
@@ -26,9 +26,7 @@ export const AppRootElementBlueprint = createExtensionBlueprint({
|
||||
kind: 'app-root-element',
|
||||
attachTo: { id: 'app/root', input: 'elements' },
|
||||
output: [coreExtensionData.reactElement],
|
||||
*factory(params: { element: JSX.Element | (() => JSX.Element) }) {
|
||||
yield coreExtensionData.reactElement(
|
||||
typeof params.element === 'function' ? params.element() : params.element,
|
||||
);
|
||||
*factory(params: { element: JSX.Element }) {
|
||||
yield coreExtensionData.reactElement(params.element);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -816,7 +816,7 @@ const appPlugin: FrontendPlugin<
|
||||
kind: 'app-root-element';
|
||||
name: 'alert-display';
|
||||
params: {
|
||||
element: JSX.Element | (() => JSX.Element);
|
||||
element: JSX.Element;
|
||||
};
|
||||
}>;
|
||||
'app-root-element:app/dialog-display': ExtensionDefinition<{
|
||||
@@ -839,7 +839,7 @@ const appPlugin: FrontendPlugin<
|
||||
kind: 'app-root-element';
|
||||
name: 'dialog-display';
|
||||
params: {
|
||||
element: JSX.Element | (() => JSX.Element);
|
||||
element: JSX.Element;
|
||||
};
|
||||
}>;
|
||||
'app-root-element:app/oauth-request-dialog': ExtensionDefinition<{
|
||||
@@ -854,7 +854,7 @@ const appPlugin: FrontendPlugin<
|
||||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
element: JSX.Element | (() => JSX.Element);
|
||||
element: JSX.Element;
|
||||
};
|
||||
}>;
|
||||
'sign-in-page:app': ExtensionDefinition<{
|
||||
|
||||
@@ -41,7 +41,7 @@ export const alertDisplayAppRootElement =
|
||||
},
|
||||
factory: (originalFactory, { config }) => {
|
||||
return originalFactory({
|
||||
element: () => <AlertDisplay {...config} />,
|
||||
element: <AlertDisplay {...config} />,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
@@ -53,7 +53,7 @@ const _default: FrontendPlugin<
|
||||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
element: JSX.Element | (() => JSX.Element);
|
||||
element: JSX.Element;
|
||||
};
|
||||
}>;
|
||||
'page:home': ExtensionDefinition<{
|
||||
|
||||
@@ -47,7 +47,7 @@ const _default: FrontendPlugin<
|
||||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
element: JSX.Element | (() => JSX.Element);
|
||||
element: JSX.Element;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user