Fix double divider on InfoCard (#3240)

Changeset

Co-authored-by: Tim Hansen <timbonicush@spotify.com>
This commit is contained in:
Tim
2020-11-05 04:11:00 -07:00
committed by GitHub
parent 64b0d9d7e0
commit 6627b626f8
2 changed files with 20 additions and 18 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core': patch
---
Fix divider prop not respected on InfoCard
+15 -18
View File
@@ -143,7 +143,7 @@ type Props = {
export const InfoCard = ({
title,
subheader,
divider,
divider = true,
deepLink,
slackChannel = '#backstage',
variant,
@@ -190,23 +190,20 @@ export const InfoCard = ({
<Card style={calculatedStyle} className={className}>
<ErrorBoundary slackChannel={slackChannel}>
{title && (
<>
<CardHeader
classes={{
root: classes.header,
title: classes.headerTitle,
subheader: classes.headerSubheader,
avatar: classes.headerAvatar,
action: classes.headerAction,
content: classes.headerContent,
}}
title={title}
subheader={subheader}
style={{ ...headerStyle }}
{...headerProps}
/>
<Divider />
</>
<CardHeader
classes={{
root: classes.header,
title: classes.headerTitle,
subheader: classes.headerSubheader,
avatar: classes.headerAvatar,
action: classes.headerAction,
content: classes.headerContent,
}}
title={title}
subheader={subheader}
style={{ ...headerStyle }}
{...headerProps}
/>
)}
{actionsTopRight && (
<CardActionsTopRight>{actionsTopRight}</CardActionsTopRight>