refactor(home): align layout input and widget data wiring
Signed-off-by: Adam Kunicki <kunickiaj@gmail.com>
This commit is contained in:
@@ -51,7 +51,7 @@ export interface HomePageLayoutBlueprintParams {
|
||||
*/
|
||||
export const HomePageLayoutBlueprint = createExtensionBlueprint({
|
||||
kind: 'home-page-layout',
|
||||
attachTo: { id: 'page:home', input: 'layouts' },
|
||||
attachTo: { id: 'page:home', input: 'layout' },
|
||||
output: [homePageLayoutComponentDataRef],
|
||||
dataRefs: {
|
||||
component: homePageLayoutComponentDataRef,
|
||||
|
||||
@@ -106,6 +106,7 @@ export const HomePageWidgetBlueprint = createExtensionBlueprint({
|
||||
);
|
||||
|
||||
yield homePageWidgetDataRef({
|
||||
node,
|
||||
component: <Widget {...(params.componentProps ?? {})} />,
|
||||
name: params.name,
|
||||
title: params.title,
|
||||
|
||||
@@ -14,7 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import {
|
||||
createExtensionDataRef,
|
||||
type AppNode,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import { JSX, ReactElement } from 'react';
|
||||
import type { CardLayout, CardSettings } from '../extensions';
|
||||
|
||||
@@ -25,6 +28,10 @@ import type { CardLayout, CardSettings } from '../extensions';
|
||||
* @alpha
|
||||
*/
|
||||
export interface HomePageWidgetData {
|
||||
/**
|
||||
* The originating app node for this widget.
|
||||
*/
|
||||
node: AppNode;
|
||||
/**
|
||||
* The rendered widget component (typically a card with header, content, etc.)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user