Web: Common: Layout: Fixed ProfileMenu usage

This commit is contained in:
Ilya Oleshko 2020-01-20 10:40:20 +03:00
parent 3ad0b797ff
commit 84973627c2
2 changed files with 8 additions and 4 deletions

View File

@ -15,6 +15,10 @@ const StyledNav = styled.nav`
height: 56px;
z-index: 190;
.profile-menu {
right: 12px;
}
& > div {
margin: 0 0 0 16px;
padding: 0;

View File

@ -1,6 +1,7 @@
import React from "react";
import PropTypes from "prop-types";
import { Avatar, DropDown, DropDownItem, DropDownProfileItem, utils, Link } from "asc-web-components";
import { Avatar, DropDown, DropDownItem, utils, Link } from "asc-web-components";
import ProfileMenu from "./../../ProfileMenu";
const { handleAnyClick } = utils.event;
class ProfileActions extends React.PureComponent {
@ -83,13 +84,12 @@ class ProfileActions extends React.PureComponent {
onClick={this.onAvatarClick}
/>
<DropDown
isUserPreview
withArrow
className='profile-menu'
directionX="right"
open={this.state.opened}
clickOutsideAction={this.onAvatarClick}
>
<DropDownProfileItem
<ProfileMenu
avatarRole={this.getUserRole(this.state.user)}
avatarSource={this.state.user.avatarMedium}
displayName={this.state.user.displayName}