Add menu to wallet
This commit is contained in:
@@ -5,15 +5,18 @@ import * as _ from 'lodash';
|
|||||||
|
|
||||||
import ActionAccountBalanceWallet from 'material-ui/svg-icons/action/account-balance-wallet';
|
import ActionAccountBalanceWallet from 'material-ui/svg-icons/action/account-balance-wallet';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
import * as CopyToClipboard from 'react-copy-to-clipboard';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import firstBy = require('thenby');
|
import firstBy = require('thenby');
|
||||||
|
|
||||||
import { Blockchain } from 'ts/blockchain';
|
import { Blockchain } from 'ts/blockchain';
|
||||||
import { AccountConnection } from 'ts/components/ui/account_connection';
|
import { AccountConnection } from 'ts/components/ui/account_connection';
|
||||||
import { Container } from 'ts/components/ui/container';
|
import { Container } from 'ts/components/ui/container';
|
||||||
|
import { DropDown } from 'ts/components/ui/drop_down';
|
||||||
import { IconButton } from 'ts/components/ui/icon_button';
|
import { IconButton } from 'ts/components/ui/icon_button';
|
||||||
import { Identicon } from 'ts/components/ui/identicon';
|
import { Identicon } from 'ts/components/ui/identicon';
|
||||||
import { Island } from 'ts/components/ui/island';
|
import { Island } from 'ts/components/ui/island';
|
||||||
|
import { SimpleMenu, SimpleMenuItem } from 'ts/components/ui/simple_menu';
|
||||||
import { Text } from 'ts/components/ui/text';
|
import { Text } from 'ts/components/ui/text';
|
||||||
import { TokenIcon } from 'ts/components/ui/token_icon';
|
import { TokenIcon } from 'ts/components/ui/token_icon';
|
||||||
import { BodyOverlay } from 'ts/components/wallet/body_overlay';
|
import { BodyOverlay } from 'ts/components/wallet/body_overlay';
|
||||||
@@ -202,14 +205,35 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
|
|||||||
const onClick = _.noop;
|
const onClick = _.noop;
|
||||||
const accessory = (
|
const accessory = (
|
||||||
<Container marginRight="15px">
|
<Container marginRight="15px">
|
||||||
<Text
|
<DropDown
|
||||||
className="zmdi zmdi-more-horiz"
|
hoverActiveNode={
|
||||||
Tag="i"
|
<Text
|
||||||
fontSize="32px"
|
className="zmdi zmdi-more-horiz"
|
||||||
fontFamily="Material-Design-Iconic-Font"
|
Tag="i"
|
||||||
fontColor={colors.darkGrey}
|
fontSize="32px"
|
||||||
onClick={onClick}
|
fontFamily="Material-Design-Iconic-Font"
|
||||||
hoverColor={colors.mediumBlue}
|
fontColor={colors.darkGrey}
|
||||||
|
onClick={onClick}
|
||||||
|
hoverColor={colors.mediumBlue}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
popoverContent={
|
||||||
|
<SimpleMenu>
|
||||||
|
<CopyToClipboard text={this.props.userAddress}>
|
||||||
|
<SimpleMenuItem text="Copy Address to Clipboard" onClick={_.noop} />
|
||||||
|
</CopyToClipboard>
|
||||||
|
<SimpleMenuItem
|
||||||
|
text="Use a Different Wallet..."
|
||||||
|
onClick={this.props.onToggleLedgerDialog}
|
||||||
|
/>
|
||||||
|
<Link to={`${WebsitePaths.Portal}/account`} style={{ textDecoration: 'none' }}>
|
||||||
|
<SimpleMenuItem text="Manage Account" onClick={_.noop} />
|
||||||
|
</Link>
|
||||||
|
</SimpleMenu>
|
||||||
|
}
|
||||||
|
anchorOrigin={{ horizontal: 'right', vertical: 'bottom' }}
|
||||||
|
targetOrigin={{ horizontal: 'right', vertical: 'top' }}
|
||||||
|
zDepth={1}
|
||||||
/>
|
/>
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user