Skip to content

Commit cf9f6d0

Browse files
fix(global-header): Fixed dropdown empty state corners by removing the border line (#1346)
1 parent e7f6aba commit cf9f6d0

2 files changed

Lines changed: 37 additions & 25 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-global-header': patch
3+
---
4+
5+
Fixed dropdown empty state corners by removing the border line

workspaces/global-header/plugins/global-header/src/components/HeaderDropdownComponent/DropdownEmptyState.tsx

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,38 @@ export const DropdownEmptyState: FC<DropdownEmptyStateProps> = ({
3434
icon,
3535
}) => {
3636
return (
37-
<InfoCard>
38-
<Box
39-
sx={{
40-
display: 'flex',
41-
flexDirection: 'column',
42-
alignItems: 'center',
43-
justifyContent: 'center',
44-
textAlign: 'center',
45-
py: 4,
46-
px: 2, // Added padding to control width
47-
maxWidth: 300, // Set max width to constrain text expansion
48-
mx: 'auto',
49-
}}
50-
>
51-
{icon}
52-
<Typography variant="h6" sx={{ mt: 2, color: 'text.primary' }}>
53-
{title}
54-
</Typography>
55-
<Typography
56-
variant="body2"
57-
sx={{ mt: 1, color: 'text.secondary', maxWidth: 250 }}
37+
<Box
38+
sx={{
39+
borderRadius: theme => theme.spacing(2.5),
40+
overflow: 'hidden',
41+
}}
42+
>
43+
<InfoCard>
44+
<Box
45+
sx={{
46+
display: 'flex',
47+
flexDirection: 'column',
48+
alignItems: 'center',
49+
justifyContent: 'center',
50+
textAlign: 'center',
51+
py: 4,
52+
px: 2, // Added padding to control width
53+
maxWidth: 300, // Set max width to constrain text expansion
54+
mx: 'auto',
55+
}}
5856
>
59-
{subTitle}
60-
</Typography>
61-
</Box>
62-
</InfoCard>
57+
{icon}
58+
<Typography variant="h6" sx={{ mt: 2, color: 'text.primary' }}>
59+
{title}
60+
</Typography>
61+
<Typography
62+
variant="body2"
63+
sx={{ mt: 1, color: 'text.secondary', maxWidth: 250 }}
64+
>
65+
{subTitle}
66+
</Typography>
67+
</Box>
68+
</InfoCard>
69+
</Box>
6370
);
6471
};

0 commit comments

Comments
 (0)