Merge pull request #19382 from tperehinets/has-kind-cards

Added title to props for Has<kind>Cards.
This commit is contained in:
Fredrik Adelöw
2023-08-18 14:27:33 +02:00
committed by GitHub
6 changed files with 29 additions and 8 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---
Added title to props for `Has<kind>Cards`.
+8
View File
@@ -445,6 +445,8 @@ export function hasCatalogProcessingErrors(
// @public (undocumented)
export interface HasComponentsCardProps {
// (undocumented)
title?: string;
// (undocumented)
variant?: InfoCardVariants;
}
@@ -462,6 +464,8 @@ export function hasRelationWarnings(
// @public (undocumented)
export interface HasResourcesCardProps {
// (undocumented)
title?: string;
// (undocumented)
variant?: InfoCardVariants;
}
@@ -471,11 +475,15 @@ export interface HasSubcomponentsCardProps {
// (undocumented)
tableOptions?: TableOptions;
// (undocumented)
title?: string;
// (undocumented)
variant?: InfoCardVariants;
}
// @public (undocumented)
export interface HasSystemsCardProps {
// (undocumented)
title?: string;
// (undocumented)
variant?: InfoCardVariants;
}
@@ -27,14 +27,15 @@ import {
/** @public */
export interface HasComponentsCardProps {
variant?: InfoCardVariants;
title?: string;
}
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}
@@ -27,14 +27,15 @@ import {
/** @public */
export interface HasResourcesCardProps {
variant?: InfoCardVariants;
title?: string;
}
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}
@@ -27,14 +27,19 @@ import {
export interface HasSubcomponentsCardProps {
variant?: InfoCardVariants;
tableOptions?: TableOptions;
title?: string;
}
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}
@@ -27,14 +27,15 @@ import {
/** @public */
export interface HasSystemsCardProps {
variant?: InfoCardVariants;
title?: string;
}
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}