center devicemenu icons

pull/460/head
slowbackspace 5 years ago
parent ea4dba96ec
commit d7b8c5262b

@ -36,10 +36,16 @@ const Divider = styled.div`
`; `;
const Label = styled.div` const Label = styled.div`
padding-left: 15px;
flex: 1; flex: 1;
`; `;
const IconWrapper = styled.div`
width: 14px;
display: flex;
justify-content: center;
margin-right: 20px;
`;
class MenuItems extends PureComponent { class MenuItems extends PureComponent {
showDeviceMenu() { showDeviceMenu() {
const { device } = this.props; const { device } = this.props;
@ -78,11 +84,13 @@ class MenuItems extends PureComponent {
</Item> */} </Item> */}
{this.showClone() && ( {this.showClone() && (
<Item onClick={() => this.props.duplicateDevice(device)}> <Item onClick={() => this.props.duplicateDevice(device)}>
<IconWrapper>
<Icon <Icon
icon={icons.WALLET_STANDARD} icon={icons.WALLET_STANDARD}
size={14} size={14}
color={colors.TEXT_SECONDARY} color={colors.TEXT_SECONDARY}
/> />
</IconWrapper>
<Label> <Label>
<FormattedMessage {...l10nMessages.TR_CHANGE_WALLET_TYPE} /> <FormattedMessage {...l10nMessages.TR_CHANGE_WALLET_TYPE} />
</Label> </Label>
@ -90,25 +98,31 @@ class MenuItems extends PureComponent {
)} )}
{!this.showRenewSession() && ( {!this.showRenewSession() && (
<Item onClick={() => this.props.acquireDevice()}> <Item onClick={() => this.props.acquireDevice()}>
<IconWrapper>
<DeviceIcon <DeviceIcon
device={this.props.device} device={this.props.device}
size={14} size={14}
color={colors.TEXT_SECONDARY} color={colors.TEXT_SECONDARY}
/> />
</IconWrapper>
<Label> <Label>
<FormattedMessage {...l10nMessages.TR_RENEW_SESSION} /> <FormattedMessage {...l10nMessages.TR_RENEW_SESSION} />
</Label> </Label>
</Item> </Item>
)} )}
<Item onClick={() => this.props.forgetDevice(device)}> <Item onClick={() => this.props.forgetDevice(device)}>
<IconWrapper>
<Icon icon={icons.EJECT} size={14} color={colors.TEXT_SECONDARY} /> <Icon icon={icons.EJECT} size={14} color={colors.TEXT_SECONDARY} />
</IconWrapper>
<Label> <Label>
<FormattedMessage {...l10nCommonMessages.TR_FORGET_DEVICE} /> <FormattedMessage {...l10nCommonMessages.TR_FORGET_DEVICE} />
</Label> </Label>
</Item> </Item>
<Divider /> <Divider />
<Item> <Item>
<IconWrapper>
<Icon icon={icons.EYE_CROSSED} size={14} color={colors.TEXT_SECONDARY} /> <Icon icon={icons.EYE_CROSSED} size={14} color={colors.TEXT_SECONDARY} />
</IconWrapper>
<Label> <Label>
<FormattedMessage {...l10nCommonMessages.TR_HIDE_BALANCE} /> <FormattedMessage {...l10nCommonMessages.TR_HIDE_BALANCE} />
</Label> </Label>
@ -127,7 +141,9 @@ class MenuItems extends PureComponent {
<Divider /> <Divider />
<Link to={getPattern('wallet-settings')}> <Link to={getPattern('wallet-settings')}>
<Item> <Item>
<IconWrapper>
<Icon icon={icons.COG} size={14} color={colors.TEXT_SECONDARY} /> <Icon icon={icons.COG} size={14} color={colors.TEXT_SECONDARY} />
</IconWrapper>
<Label> <Label>
<FormattedMessage {...l10nCommonMessages.TR_APPLICATION_SETTINGS} /> <FormattedMessage {...l10nCommonMessages.TR_APPLICATION_SETTINGS} />
</Label> </Label>

Loading…
Cancel
Save