From 2e4cb15188789bf085b90126305ab8803cdf7e61 Mon Sep 17 00:00:00 2001 From: Adam Kunicki Date: Fri, 21 Mar 2025 09:53:45 -0700 Subject: [PATCH] Fixes previous attempt to auto-hide divider The divider prop was only being set when title was present, and the default value for divider is true. This unconditionally sets the divider prop. Signed-off-by: Adam Kunicki --- .changeset/tiny-swans-warn.md | 5 +++++ plugins/home-react/src/extensions.tsx | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/tiny-swans-warn.md diff --git a/.changeset/tiny-swans-warn.md b/.changeset/tiny-swans-warn.md new file mode 100644 index 0000000000..45c6435a5d --- /dev/null +++ b/.changeset/tiny-swans-warn.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-home-react': patch +--- + +Fixes auto-hiding of content divider when title not specified diff --git a/plugins/home-react/src/extensions.tsx b/plugins/home-react/src/extensions.tsx index 71b17a81a4..dd4b1e9df7 100644 --- a/plugins/home-react/src/extensions.tsx +++ b/plugins/home-react/src/extensions.tsx @@ -152,7 +152,8 @@ function CardExtension(props: CardExtensionComponentProps) { } const cardProps = { - ...(title && { title, divider: !!title }), + divider: !!title, + ...(title && { title }), ...(Settings && !isCustomizable ? { action: (