Merge pull request #15747 from RoadieHQ/bazaar-title

allow customisation of bazaar title and subtitle
This commit is contained in:
Fredrik Adelöw
2023-01-16 13:44:06 +01:00
committed by GitHub
5 changed files with 27 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-bazaar': patch
---
Allow customisation of title and subtitle on bazaar page.
+7 -1
View File
@@ -24,7 +24,13 @@ export type BazaarOverviewCardProps = {
};
// @public (undocumented)
export const BazaarPage: () => JSX.Element;
export const BazaarPage: (props: BazaarPageProps) => JSX.Element;
// @public (undocumented)
export type BazaarPageProps = {
title?: string;
subtitle?: string;
};
// @public (undocumented)
export const bazaarPlugin: BackstagePlugin<
@@ -19,7 +19,15 @@ import { Header, RoutedTabs } from '@backstage/core-components';
import { SortView } from '../SortView';
import { About } from '../About';
export const HomePage = () => {
/** @public */
export type HomePageProps = {
title?: string;
subtitle?: string;
};
export const HomePage = (props: HomePageProps) => {
const { title, subtitle } = props;
const tabContent = [
{
path: '/',
@@ -35,7 +43,10 @@ export const HomePage = () => {
return (
<div>
<Header title="Bazaar" subtitle="Marketplace for inner source projects" />
<Header
title={title || 'Bazaar'}
subtitle={subtitle || 'Marketplace for inner source projects'}
/>
<RoutedTabs routes={tabContent} />
</div>
);
@@ -15,3 +15,4 @@
*/
export { HomePage } from './HomePage';
export type { HomePageProps } from './HomePage';
+1
View File
@@ -20,3 +20,4 @@ export { BazaarOverviewCard } from './components/BazaarOverviewCard';
export type { BazaarOverviewCardProps } from './components/BazaarOverviewCard';
export { EntityBazaarInfoCard } from './components/EntityBazaarInfoCard';
export { SortView } from './components/SortView';
export type { HomePageProps as BazaarPageProps } from './components/HomePage';