diff --git a/.changeset/four-birds-peel.md b/.changeset/four-birds-peel.md index 2d742363fe..f315f7a326 100644 --- a/.changeset/four-birds-peel.md +++ b/.changeset/four-birds-peel.md @@ -2,4 +2,6 @@ '@backstage/plugin-home': patch --- -Adds new HomePageStackOverflowQuestions component which renders a list of stack overflow questions on your homepage. +- Adds new HomePageStackOverflowQuestions component which renders a list of stack overflow questions on your homepage. + +- Exports ComponentRenderer type. diff --git a/plugins/home/api-report.md b/plugins/home/api-report.md index 6fae50151c..8cb5ef3d1c 100644 --- a/plugins/home/api-report.md +++ b/plugins/home/api-report.md @@ -39,6 +39,13 @@ export const ComponentAccordion: ({ ContextProvider?: ((props: any) => JSX.Element) | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "ComponentRenderer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type ComponentRenderer = { + Renderer?: (props: RendererProps) => JSX.Element; +}; + // Warning: (ae-missing-release-tag) "ComponentTab" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -103,7 +110,6 @@ export const HomepageCompositionRoot: (props: { children?: ReactNode; }) => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "ComponentRenderer" needs to be exported by the entry point index.d.ts // Warning: (ae-missing-release-tag) "HomePageRandomJoke" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -161,5 +167,6 @@ export const WelcomeTitle: () => JSX.Element; // Warnings were encountered during analysis: // +// src/extensions.d.ts:3:5 - (ae-forgotten-export) The symbol "RendererProps" needs to be exported by the entry point index.d.ts // src/extensions.d.ts:24:5 - (ae-forgotten-export) The symbol "ComponentParts" needs to be exported by the entry point index.d.ts ``` diff --git a/plugins/home/src/index.ts b/plugins/home/src/index.ts index 4871323677..d30b76a7fc 100644 --- a/plugins/home/src/index.ts +++ b/plugins/home/src/index.ts @@ -35,3 +35,4 @@ export { export { SettingsModal, HeaderWorldClock } from './components'; export type { ClockConfig } from './components'; export { createCardExtension } from './extensions'; +export type { ComponentRenderer } from './extensions'; diff --git a/plugins/stack-overflow/api-report.md b/plugins/stack-overflow/api-report.md index d8e944a35d..277b0272d1 100644 --- a/plugins/stack-overflow/api-report.md +++ b/plugins/stack-overflow/api-report.md @@ -6,7 +6,7 @@ /// import { BackstagePlugin } from '@backstage/core-plugin-api'; -import { ComponentRenderer } from '@backstage/plugin-home/src/extensions'; +import { ComponentRenderer } from '@backstage/plugin-home'; import { ReactNode } from 'react'; // @public diff --git a/plugins/stack-overflow/package.json b/plugins/stack-overflow/package.json index 350f4aa0ca..0bc9c1c161 100644 --- a/plugins/stack-overflow/package.json +++ b/plugins/stack-overflow/package.json @@ -36,14 +36,15 @@ "@testing-library/jest-dom": "^5.10.1" }, "peerDependencies": { + "@types/react": "^16.13.1 || ^17.0.0", "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.13.2-next.0", + "@backstage/cli": "^0.15.0", + "@backstage/test-utils": "^0.3.0", + "@testing-library/react": "^11.2.5", "@backstage/core-app-api": "^0.5.2", "@backstage/dev-utils": "^0.2.21-next.0", - "@backstage/test-utils": "^0.2.4", - "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", "@types/jest": "*", "@types/node": "*",