user menu rendered as a popup

This commit is contained in:
NikolaBorislavovHristov 2018-06-20 17:31:14 +03:00
parent acb7e67a6a
commit 60ba1c9172
2 changed files with 17 additions and 10 deletions

View file

@ -1,17 +1,21 @@
import React, { Component } from 'react';
import React, { PureComponent } from 'react';
import Icon from 'stremio-icons/dom';
import { Popup } from 'stremio-common';
import styles from './styles';
class UserMenu extends Component {
open = () => {
}
class UserMenu extends PureComponent {
render() {
return (
<button className={styles['menu-button']} onClick={this.open}>
<Icon className={styles['user-icon']} icon={'ic_user'} />
</button>
<Popup>
<Popup.Label>
<button className={styles['popup-label-container']}>
<Icon className={styles['user-icon']} icon={'ic_user'} />
</button>
</Popup.Label>
<Popup.Menu width={300}>
<div style={{ background: 'red', width: '100%', height: 300 }}>kopele</div>
</Popup.Menu>
</Popup>
);
}
}

View file

@ -1,6 +1,9 @@
.menu-button {
.popup-label-container {
height: 44px;
width: 44px;
display: flex;
justify-content: center;
align-items: center;
background-color: transparent;
.user-icon {
width: 40%;