Rename PageTab to PageLayoutTab in @backstage/frontend-plugin-api

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-06 11:21:32 +01:00
parent 56f39bffdd
commit edb872c49a
5 changed files with 26 additions and 7 deletions
+5 -2
View File
@@ -1802,13 +1802,13 @@ export interface PageLayoutProps {
// (undocumented)
noHeader?: boolean;
// (undocumented)
tabs?: PageTab[];
tabs?: PageLayoutTab[];
// (undocumented)
title?: string;
}
// @public
export interface PageTab {
export interface PageLayoutTab {
// (undocumented)
href: string;
// (undocumented)
@@ -1819,6 +1819,9 @@ export interface PageTab {
label: string;
}
// @public @deprecated (undocumented)
export type PageTab = PageLayoutTab;
// @public
export type PendingOAuthRequest = {
provider: AuthProviderInfo;
@@ -23,7 +23,7 @@ import {
createExtensionBlueprint,
createExtensionInput,
} from '../wiring';
import { ExtensionBoundary, PageLayout, PageTab } from '../components';
import { ExtensionBoundary, PageLayout, PageLayoutTab } from '../components';
import { useApi } from '../apis/system';
import { pluginHeaderActionsApiRef } from '../apis/definitions/PluginHeaderActionsApi';
@@ -97,7 +97,7 @@ export const PageBlueprint = createExtensionBlueprint({
yield coreExtensionData.reactElement(<PageContent />);
} else if (inputs.pages.length > 0) {
// Parent page with sub-pages - render header with tabs
const tabs: PageTab[] = inputs.pages.map(page => {
const tabs: PageLayoutTab[] = inputs.pages.map(page => {
const path = page.get(coreExtensionData.routePath);
const tabTitle = page.get(coreExtensionData.title);
const tabIcon = page.get(coreExtensionData.icon);
@@ -22,13 +22,19 @@ import { createSwappableComponent } from './createSwappableComponent';
* Tab configuration for page navigation
* @public
*/
export interface PageTab {
export interface PageLayoutTab {
id: string;
label: string;
icon?: IconElement;
href: string;
}
/**
* @deprecated Use {@link PageLayoutTab} instead
* @public
*/
export type PageTab = PageLayoutTab;
/**
* Props for the PageLayout component
* @public
@@ -38,7 +44,7 @@ export interface PageLayoutProps {
icon?: IconElement;
noHeader?: boolean;
headerActions?: Array<JSX.Element | null>;
tabs?: PageTab[];
tabs?: PageLayoutTab[];
children?: ReactNode;
}
@@ -25,4 +25,9 @@ export {
} from './createSwappableComponent';
export { useAppNode } from './AppNodeProvider';
export * from './DefaultSwappableComponents';
export { PageLayout, type PageLayoutProps, type PageTab } from './PageLayout';
export {
PageLayout,
type PageLayoutProps,
type PageLayoutTab,
type PageTab,
} from './PageLayout';