Merge pull request #4742 from SDA-SE/feat/multiple-supportlinks
Improve rendering of multiple support item links in the SupportButton
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Improve rendering of multiple support item links in the `SupportButton`
|
||||
@@ -65,14 +65,14 @@ const SupportListItem = ({ item }: { item: SupportItem }) => {
|
||||
</ListItemIcon>
|
||||
<ListItemText
|
||||
primary={item.title}
|
||||
secondary={
|
||||
<>
|
||||
{item.links &&
|
||||
item.links.map(link => (
|
||||
<SupportLink link={link} key={link.url} />
|
||||
))}
|
||||
</>
|
||||
}
|
||||
secondary={item.links?.reduce<React.ReactNodeArray>(
|
||||
(prev, link, idx) => [
|
||||
...prev,
|
||||
idx > 0 && <br key={idx} />,
|
||||
<SupportLink link={link} key={link.url} />,
|
||||
],
|
||||
[],
|
||||
)}
|
||||
/>
|
||||
</ListItem>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user