add onClose action to edit menu
This commit is contained in:
parent
bcd1aea8a6
commit
b48f455ecb
|
@ -47,7 +47,7 @@ class SimpleDialog extends React.Component {
|
||||||
</ListItemAvatar>
|
</ListItemAvatar>
|
||||||
<ListItemText primary="Edit Contact Code" />
|
<ListItemText primary="Edit Contact Code" />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem button onClick={() => this.handleListItemClick('addAccount')}>
|
<ListItem button onClick={() => this.handleListItemClick('release')}>
|
||||||
<ListItemAvatar>
|
<ListItemAvatar>
|
||||||
<Avatar>
|
<Avatar>
|
||||||
<DeleteOutline />
|
<DeleteOutline />
|
||||||
|
|
|
@ -92,6 +92,7 @@ class RenderAddresses extends PureComponent {
|
||||||
const isCopied = address => address == copied;
|
const isCopied = address => address == copied;
|
||||||
const renderCopied = address => isCopied(address) && <span style={{ color: theme.positive }}><IconCheck/>Copied!</span>;
|
const renderCopied = address => isCopied(address) && <span style={{ color: theme.positive }}><IconCheck/>Copied!</span>;
|
||||||
const isOwner = defaultAccount === address;
|
const isOwner = defaultAccount === address;
|
||||||
|
const onClose = value => { this.setState({ editAction: value, editMenu: false }) }
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Hidden mdDown>
|
<Hidden mdDown>
|
||||||
|
@ -110,7 +111,7 @@ class RenderAddresses extends PureComponent {
|
||||||
<Hidden mdUp>
|
<Hidden mdUp>
|
||||||
<MobileAddressDisplay {...this.props} isOwner={isOwner} />
|
<MobileAddressDisplay {...this.props} isOwner={isOwner} />
|
||||||
{isOwner && <MobileButton text="Edit" style={{ marginLeft: '35%' }} onClick={() => { this.setState({ editMenu: true }) } }/>}
|
{isOwner && <MobileButton text="Edit" style={{ marginLeft: '35%' }} onClick={() => { this.setState({ editMenu: true }) } }/>}
|
||||||
{editMenu && <EditOptions open={editMenu} />}
|
{editMenu && <EditOptions open={editMenu} onClose={onClose} />}
|
||||||
</Hidden>
|
</Hidden>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue