Skip to content

Commit 4dc0d7c

Browse files
author
Stephen Cefali
authored
fix withTheme bug with FeaturedBadge (#26195)
Apparently, wrapping a styled component with withTheme is bad
1 parent 68541fd commit 4dc0d7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

static/app/components/featureBadge.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const FeaturedBadge = ({
4444
<React.Fragment>
4545
{variant === 'badge' && <StyledTag priority={type}>{labels[type]}</StyledTag>}
4646
{variant === 'indicator' && (
47-
<CircleIndicator color={theme?.badge[type].indicatorColor} size={8} />
47+
<CircleIndicator color={theme.badge[type].indicatorColor} size={8} />
4848
)}
4949
</React.Fragment>
5050
</Tooltip>
@@ -55,12 +55,12 @@ const StyledTag = styled(Tag)`
5555
padding: 3px ${space(0.75)};
5656
`;
5757

58-
const StyledFeatureBadge = styled(FeaturedBadge)`
58+
const StyledFeatureBadge = styled(withTheme(FeaturedBadge))`
5959
display: inline-flex;
6060
align-items: center;
6161
margin-left: ${space(0.75)};
6262
position: relative;
6363
top: -1px;
6464
`;
6565

66-
export default withTheme(StyledFeatureBadge);
66+
export default StyledFeatureBadge;

0 commit comments

Comments
 (0)