frontend-plugin-api: copy SignInPageProps

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2025-11-23 01:36:57 +01:00
parent 8a219a4c89
commit debd56dcf2
4 changed files with 30 additions and 5 deletions
+6 -1
View File
@@ -20,7 +20,6 @@ import { Observable } from '@backstage/types';
import { PropsWithChildren } from 'react';
import { ReactNode } from 'react';
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
import { SignInPageProps } from '@backstage/core-plugin-api';
import { z } from 'zod';
// @public
@@ -2013,6 +2012,12 @@ export const SignInPageBlueprint: ExtensionBlueprint<{
};
}>;
// @public
export type SignInPageProps = {
onSignInSuccess(identityApi: IdentityApi): void;
children?: ReactNode;
};
// @public
export interface StorageApi {
forBucket(name: string): StorageApi;
@@ -14,10 +14,27 @@
* limitations under the License.
*/
import { ComponentType, lazy } from 'react';
import { ComponentType, lazy, ReactNode } from 'react';
import { createExtensionBlueprint, createExtensionDataRef } from '../wiring';
import { SignInPageProps } from '@backstage/core-plugin-api';
import { ExtensionBoundary } from '../components';
import { IdentityApi } from '../apis';
/**
* Props for the `SignInPage` component.
*
* @public
*/
export type SignInPageProps = {
/**
* Set the IdentityApi on successful sign-in. This should only be called once.
*/
onSignInSuccess(identityApi: IdentityApi): void;
/**
* The children to render.
*/
children?: ReactNode;
};
const componentDataRef = createExtensionDataRef<
ComponentType<SignInPageProps>
@@ -30,7 +30,10 @@ export {
export { NavItemBlueprint } from './NavItemBlueprint';
export { PageBlueprint } from './PageBlueprint';
export { RouterBlueprint } from './RouterBlueprint';
export { SignInPageBlueprint } from './SignInPageBlueprint';
export {
type SignInPageProps,
SignInPageBlueprint,
} from './SignInPageBlueprint';
export { ThemeBlueprint } from './ThemeBlueprint';
export { TranslationBlueprint } from './TranslationBlueprint';
export { SwappableComponentBlueprint } from './SwappableComponentBlueprint';
+1 -1
View File
@@ -20,7 +20,7 @@ import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
import { ReactNode } from 'react';
import { RouteRef } from '@backstage/frontend-plugin-api';
import { SignInPageProps } from '@backstage/core-plugin-api';
import { SignInPageProps } from '@backstage/frontend-plugin-api';
import { SwappableComponentRef } from '@backstage/frontend-plugin-api';
import { TranslationMessages } from '@backstage/frontend-plugin-api';
import { TranslationResource } from '@backstage/frontend-plugin-api';