Open user menu with a click/tap
This commit is contained in:
@@ -21,6 +21,10 @@ class HeaderMenu extends React.Component {
|
|||||||
this.setState({ menuVisible: false });
|
this.setState({ menuVisible: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onClick = () => {
|
||||||
|
this.setState({ menuVisible: !this.state.menuVisible });
|
||||||
|
}
|
||||||
|
|
||||||
logout = (event) => {
|
logout = (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.props.logout();
|
this.props.logout();
|
||||||
@@ -33,7 +37,7 @@ class HeaderMenu extends React.Component {
|
|||||||
onMouseEnter={ this.onMouseEnter }
|
onMouseEnter={ this.onMouseEnter }
|
||||||
onMouseLeave={ this.onMouseLeave }
|
onMouseLeave={ this.onMouseLeave }
|
||||||
>
|
>
|
||||||
<div className={ styles.content }>
|
<div className={ styles.content } onClick={ this.onClick }>
|
||||||
{ this.props.children }
|
{ this.props.children }
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
min-height: 43px;
|
min-height: 43px;
|
||||||
min-width: 43px;
|
min-width: 43px;
|
||||||
|
|||||||
Reference in New Issue
Block a user