Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui) Make profile icon clickable to expand header menu #5317

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions datahub-web-react/src/app/shared/ManageAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ const DownArrow = styled(CaretDownOutlined)`
color: ${ANTD_GRAY[7]};
`;

const DropdownWrapper = styled.div`
align-items: center;
cursor: pointer;
display: flex;
`;

interface Props {
urn: string;
pictureLink?: string;
Expand Down Expand Up @@ -102,12 +108,12 @@ export const ManageAccount = ({ urn: _urn, pictureLink: _pictureLink, name }: Pr
);

return (
<>
<CustomAvatar photoUrl={_pictureLink} style={{ marginRight: 4 }} name={name} />
<Dropdown overlay={menu} trigger={['click']}>
<Dropdown overlay={menu} trigger={['click']}>
<DropdownWrapper>
<CustomAvatar photoUrl={_pictureLink} style={{ marginRight: 4 }} name={name} />
<DownArrow />
</Dropdown>
</>
</DropdownWrapper>
</Dropdown>
);
};

Expand Down