Skip to content

Commit aaaaf2d

Browse files
Added divider for sign out section in global header (#1339)
1 parent 03c0a11 commit aaaaf2d

2 files changed

Lines changed: 19 additions & 6 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+
Add divider above Sign out option in profile dropdown for better visual separation

workspaces/global-header/plugins/global-header/src/components/LogoutButton/LogoutButton.tsx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
} from '@backstage/core-plugin-api';
2222

2323
import MenuItem from '@mui/material/MenuItem';
24+
import Divider from '@mui/material/Divider';
2425

2526
import { MenuItemLinkContent } from '../MenuItemLink/MenuItemLinkContent';
2627

@@ -33,11 +34,18 @@ export const LogoutButton = () => {
3334
};
3435

3536
return (
36-
<MenuItem
37-
onClick={handleLogout}
38-
sx={{ cursor: 'pointer', width: '100%', color: 'inherit' }}
39-
>
40-
<MenuItemLinkContent icon="logout" label="Sign out" />
41-
</MenuItem>
37+
<>
38+
<Divider />
39+
<MenuItem
40+
onClick={handleLogout}
41+
sx={{
42+
cursor: 'pointer',
43+
width: '100%',
44+
color: 'inherit',
45+
}}
46+
>
47+
<MenuItemLinkContent icon="logout" label="Sign out" />
48+
</MenuItem>
49+
</>
4250
);
4351
};

0 commit comments

Comments
 (0)