diff --git a/.changeset/rude-ways-camp.md b/.changeset/rude-ways-camp.md new file mode 100644 index 0000000000..37413141bd --- /dev/null +++ b/.changeset/rude-ways-camp.md @@ -0,0 +1,5 @@ +--- +'@backstage/core': patch +--- + +Improve rendering of multiple support item links in the `SupportButton` diff --git a/packages/core/src/components/SupportButton/SupportButton.tsx b/packages/core/src/components/SupportButton/SupportButton.tsx index 7c532c0f8f..eea2b000ca 100644 --- a/packages/core/src/components/SupportButton/SupportButton.tsx +++ b/packages/core/src/components/SupportButton/SupportButton.tsx @@ -65,14 +65,14 @@ const SupportListItem = ({ item }: { item: SupportItem }) => { - {item.links && - item.links.map(link => ( - - ))} - - } + secondary={item.links?.reduce( + (prev, link, idx) => [ + ...prev, + idx > 0 &&
, + , + ], + [], + )} /> );