fix receive address eye icon and DeviceIcon

pull/460/head
slowbackspace 5 years ago
parent 6a673d3d00
commit 71d348d9c2

@ -30,10 +30,20 @@ const DeviceIcon = ({
color = COLORS.TEXT_SECONDARY, color = COLORS.TEXT_SECONDARY,
hoverColor, hoverColor,
onClick, onClick,
...rest
}: Props) => { }: Props) => {
const majorVersion = device.features ? device.features.major_version : 2; const majorVersion = device.features ? device.features.major_version : 2;
const icon = getDeviceIcon(majorVersion); const icon = getDeviceIcon(majorVersion);
return <Icon icon={icon} hoverColor={hoverColor} onClick={onClick} color={color} size={size} />; return (
<Icon
icon={icon}
hoverColor={hoverColor}
onClick={onClick}
color={color}
size={size}
{...rest}
/>
);
}; };
DeviceIcon.propTypes = { DeviceIcon.propTypes = {

@ -78,7 +78,7 @@ const QrWrapper = styled.div`
`; `;
const StyledDeviceIcon = styled(DeviceIcon)` const StyledDeviceIcon = styled(DeviceIcon)`
margin-right: 6px; margin: 0 6px;
`; `;
const AccountReceive = (props: Props) => { const AccountReceive = (props: Props) => {

@ -59,9 +59,7 @@ const ShowAddressButton = styled(Button)`
const EyeButton = styled(Button)` const EyeButton = styled(Button)`
z-index: 10001; z-index: 10001;
padding: 0; padding: 0;
width: 30px; top: 12px;
background: transparent;
top: 5px;
position: absolute; position: absolute;
right: 10px; right: 10px;
@ -85,6 +83,10 @@ const QrWrapper = styled.div`
flex-direction: column; flex-direction: column;
`; `;
const StyledDeviceIcon = styled(DeviceIcon)`
margin: 0 6px;
`;
const AccountReceive = (props: Props) => { const AccountReceive = (props: Props) => {
const device = props.wallet.selectedDevice; const device = props.wallet.selectedDevice;
const { account, discovery, shouldRender } = props.selectedAccount; const { account, discovery, shouldRender } = props.selectedAccount;
@ -124,7 +126,11 @@ const AccountReceive = (props: Props) => {
trezorAction={ trezorAction={
isAddressVerifying ? ( isAddressVerifying ? (
<React.Fragment> <React.Fragment>
<DeviceIcon device={device} color={colors.WHITE} /> <StyledDeviceIcon
size={16}
device={device}
color={colors.WHITE}
/>
<FormattedMessage <FormattedMessage
{...l10nReceiveMessages.TR_CHECK_ADDRESS_ON_TREZOR} {...l10nReceiveMessages.TR_CHECK_ADDRESS_ON_TREZOR}
/> />
@ -145,9 +151,11 @@ const AccountReceive = (props: Props) => {
} }
> >
<EyeButton <EyeButton
isTransparent
onClick={() => props.showAddress(account.accountPath)} onClick={() => props.showAddress(account.accountPath)}
> >
<Icon <Icon
size={16}
icon={ icon={
addressUnverified addressUnverified
? ICONS.EYE_CROSSED ? ICONS.EYE_CROSSED

Loading…
Cancel
Save