aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-07-01 14:32:06 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-07-02 05:50:55 +0800
commit6daf754f5bb4aa85d0f65bfdaf8910db4401d1cc (patch)
tree91f68a3472070ce63fa2a6fa1cdf3b8426b56762 /packages
parentda8cf9981eda4a068c22d0107e07b704afda2584 (diff)
downloaddexon-sol-tools-6daf754f5bb4aa85d0f65bfdaf8910db4401d1cc.tar
dexon-sol-tools-6daf754f5bb4aa85d0f65bfdaf8910db4401d1cc.tar.gz
dexon-sol-tools-6daf754f5bb4aa85d0f65bfdaf8910db4401d1cc.tar.bz2
dexon-sol-tools-6daf754f5bb4aa85d0f65bfdaf8910db4401d1cc.tar.lz
dexon-sol-tools-6daf754f5bb4aa85d0f65bfdaf8910db4401d1cc.tar.xz
dexon-sol-tools-6daf754f5bb4aa85d0f65bfdaf8910db4401d1cc.tar.zst
dexon-sol-tools-6daf754f5bb4aa85d0f65bfdaf8910db4401d1cc.zip
Add menu to wallet
Diffstat (limited to 'packages')
-rw-r--r--packages/website/ts/components/wallet/wallet.tsx40
1 files changed, 32 insertions, 8 deletions
diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index 899f8e3a3..b43164664 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -5,15 +5,18 @@ import * as _ from 'lodash';
import ActionAccountBalanceWallet from 'material-ui/svg-icons/action/account-balance-wallet';
import * as React from 'react';
+import * as CopyToClipboard from 'react-copy-to-clipboard';
import { Link } from 'react-router-dom';
import firstBy = require('thenby');
import { Blockchain } from 'ts/blockchain';
import { AccountConnection } from 'ts/components/ui/account_connection';
import { Container } from 'ts/components/ui/container';
+import { DropDown } from 'ts/components/ui/drop_down';
import { IconButton } from 'ts/components/ui/icon_button';
import { Identicon } from 'ts/components/ui/identicon';
import { Island } from 'ts/components/ui/island';
+import { SimpleMenu, SimpleMenuItem } from 'ts/components/ui/simple_menu';
import { Text } from 'ts/components/ui/text';
import { TokenIcon } from 'ts/components/ui/token_icon';
import { BodyOverlay } from 'ts/components/wallet/body_overlay';
@@ -202,14 +205,35 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
const onClick = _.noop;
const accessory = (
<Container marginRight="15px">
- <Text
- className="zmdi zmdi-more-horiz"
- Tag="i"
- fontSize="32px"
- fontFamily="Material-Design-Iconic-Font"
- fontColor={colors.darkGrey}
- onClick={onClick}
- hoverColor={colors.mediumBlue}
+ <DropDown
+ hoverActiveNode={
+ <Text
+ className="zmdi zmdi-more-horiz"
+ Tag="i"
+ fontSize="32px"
+ fontFamily="Material-Design-Iconic-Font"
+ 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>
);