fix: theme id and headerOptions in TemplateListPage
Signed-off-by: Federico Morreale <frc.morreale@gmail.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Added `headerOptions` to `TemplateListPage` to optionally override default values.
|
||||
Changed themeId of TemplateListPage from `website` to `home`.
|
||||
@@ -133,6 +133,7 @@ export const Router = (props: PropsWithChildren<RouterProps>) => {
|
||||
contextMenu={props.contextMenu}
|
||||
groups={props.groups}
|
||||
templateFilter={props.templateFilter}
|
||||
headerOptions={props.headerOptions}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -67,6 +67,11 @@ export type TemplateListPageProps = {
|
||||
actions?: boolean;
|
||||
tasks?: boolean;
|
||||
};
|
||||
headerOptions?: {
|
||||
pageTitleOverride?: string;
|
||||
title?: string;
|
||||
subtitle?: string;
|
||||
};
|
||||
};
|
||||
|
||||
const defaultGroup: TemplateGroupFilter = {
|
||||
@@ -93,6 +98,7 @@ export const TemplateListPage = (props: TemplateListPageProps) => {
|
||||
TemplateCardComponent,
|
||||
groups: givenGroups = [],
|
||||
templateFilter,
|
||||
headerOptions,
|
||||
} = props;
|
||||
const navigate = useNavigate();
|
||||
const editorLink = useRouteRef(editRouteRef);
|
||||
@@ -151,11 +157,12 @@ export const TemplateListPage = (props: TemplateListPageProps) => {
|
||||
|
||||
return (
|
||||
<EntityListProvider>
|
||||
<Page themeId="website">
|
||||
<Page themeId="home">
|
||||
<Header
|
||||
pageTitleOverride="Create a new component"
|
||||
title="Create a new component"
|
||||
subtitle="Create new software components using standard templates in your organization"
|
||||
{...headerOptions}
|
||||
>
|
||||
<ScaffolderPageContextMenu {...scaffolderPageContextMenuProps} />
|
||||
</Header>
|
||||
|
||||
Reference in New Issue
Block a user