Improve rendering of multiple support item links in the SupportButton
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Improve rendering of multiple support item links in the `SupportButton`
|
||||
@@ -66,12 +66,12 @@ const SupportListItem = ({ item }: { item: SupportItem }) => {
|
||||
<ListItemText
|
||||
primary={item.title}
|
||||
secondary={
|
||||
<>
|
||||
{item.links &&
|
||||
item.links.map(link => (
|
||||
<SupportLink link={link} key={link.url} />
|
||||
))}
|
||||
</>
|
||||
item.links &&
|
||||
item.links
|
||||
.map<React.ReactNode>(link => (
|
||||
<SupportLink link={link} key={link.url} />
|
||||
))
|
||||
.reduce((prev, curr, idx) => [prev, <br key={idx} />, curr])
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
|
||||
Reference in New Issue
Block a user