diff --git a/ui/app/components/app/account-menu/account-menu.component.js b/ui/app/components/app/account-menu/account-menu.component.js
index 6409a9cd6..ec3f3f7a9 100644
--- a/ui/app/components/app/account-menu/account-menu.component.js
+++ b/ui/app/components/app/account-menu/account-menu.component.js
@@ -3,8 +3,7 @@ import PropTypes from 'prop-types'
import { debounce } from 'lodash'
import Fuse from 'fuse.js'
import InputAdornment from '@material-ui/core/InputAdornment'
-
-import { Menu, Item, Divider, CloseArea } from '../dropdowns/components/menu'
+import classnames from 'classnames'
import { ENVIRONMENT_TYPE_POPUP } from '../../../../../app/scripts/lib/enums'
import { getEnvironmentType } from '../../../../../app/scripts/lib/util'
import Identicon from '../../ui/identicon'
@@ -22,6 +21,42 @@ import {
import TextField from '../../ui/text-field'
import SearchIcon from '../../ui/search-icon'
+export function AccountMenuItem (props) {
+ const {
+ icon,
+ children,
+ text,
+ subText,
+ className,
+ onClick,
+ } = props
+
+ const itemClassName = classnames('account-menu__item', className, {
+ 'account-menu__item--clickable': Boolean(onClick),
+ })
+ return children
+ ?
{children}
+ : (
+
+ {icon ?
{icon}
: null}
+ {text ?
{text}
: null}
+ {subText ?
{subText}
: null}
+
+ )
+}
+
+AccountMenuItem.propTypes = {
+ icon: PropTypes.node,
+ children: PropTypes.node,
+ text: PropTypes.node,
+ subText: PropTypes.node,
+ onClick: PropTypes.func,
+ className: PropTypes.string,
+}
+
export default class AccountMenu extends Component {
static contextTypes = {
t: PropTypes.func,
@@ -106,7 +141,7 @@ export default class AccountMenu extends Component {
fullWidth
theme="material-white-padded"
/>,
- ,
+ ,
]
}
@@ -277,13 +312,16 @@ export default class AccountMenu extends Component {
history,
} = this.props
+ if (!isAccountMenuOpen) {
+ return null
+ }
+
return (
-