Added title to props for Has<kind>Cards.
Signed-off-by: tperehinets <tetiana.perehinets@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Added title to props for `Has<kind>Cards`.
|
||||
@@ -30,11 +30,11 @@ export interface HasComponentsCardProps {
|
||||
}
|
||||
|
||||
export function HasComponentsCard(props: HasComponentsCardProps) {
|
||||
const { variant = 'gridItem' } = props;
|
||||
const { variant = 'gridItem', title = 'Has components' } = props;
|
||||
return (
|
||||
<RelatedEntitiesCard
|
||||
variant={variant}
|
||||
title="Has components"
|
||||
title={title}
|
||||
entityKind="Component"
|
||||
relationType={RELATION_HAS_PART}
|
||||
columns={componentEntityColumns}
|
||||
|
||||
@@ -30,11 +30,11 @@ export interface HasResourcesCardProps {
|
||||
}
|
||||
|
||||
export function HasResourcesCard(props: HasResourcesCardProps) {
|
||||
const { variant = 'gridItem' } = props;
|
||||
const { variant = 'gridItem', title = 'Has resources' } = props;
|
||||
return (
|
||||
<RelatedEntitiesCard
|
||||
variant={variant}
|
||||
title="Has resources"
|
||||
title={title}
|
||||
entityKind="Resource"
|
||||
relationType={RELATION_HAS_PART}
|
||||
columns={resourceEntityColumns}
|
||||
|
||||
@@ -30,11 +30,15 @@ export interface HasSubcomponentsCardProps {
|
||||
}
|
||||
|
||||
export function HasSubcomponentsCard(props: HasSubcomponentsCardProps) {
|
||||
const { variant = 'gridItem', tableOptions = {} } = props;
|
||||
const {
|
||||
variant = 'gridItem',
|
||||
tableOptions = {},
|
||||
title = 'Has subcomponents',
|
||||
} = props;
|
||||
return (
|
||||
<RelatedEntitiesCard
|
||||
variant={variant}
|
||||
title="Has subcomponents"
|
||||
title={title}
|
||||
entityKind="Component"
|
||||
relationType={RELATION_HAS_PART}
|
||||
columns={componentEntityColumns}
|
||||
|
||||
@@ -30,11 +30,11 @@ export interface HasSystemsCardProps {
|
||||
}
|
||||
|
||||
export function HasSystemsCard(props: HasSystemsCardProps) {
|
||||
const { variant = 'gridItem' } = props;
|
||||
const { variant = 'gridItem', title = 'Has systems' } = props;
|
||||
return (
|
||||
<RelatedEntitiesCard
|
||||
variant={variant}
|
||||
title="Has systems"
|
||||
title={title}
|
||||
entityKind="System"
|
||||
relationType={RELATION_HAS_PART}
|
||||
columns={systemEntityColumns}
|
||||
|
||||
Reference in New Issue
Block a user