1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-07-03 05:12:40 +00:00

tooltip position fixed

This commit is contained in:
Vladimir Volek 2018-10-08 10:48:32 +02:00 committed by Szymon Lesisz
parent 2d9f02a4e6
commit f32c2d351d
2 changed files with 65 additions and 73 deletions

View File

@ -60,8 +60,8 @@
"redux-logger": "^3.0.6", "redux-logger": "^3.0.6",
"redux-raven-middleware": "^1.2.0", "redux-raven-middleware": "^1.2.0",
"redux-thunk": "^2.2.0", "redux-thunk": "^2.2.0",
"styled-components": "^3.4.9",
"rimraf": "^2.6.2", "rimraf": "^2.6.2",
"styled-components": "^3.4.9",
"styled-media-query": "^2.0.2", "styled-media-query": "^2.0.2",
"styled-normalize": "^8.0.0", "styled-normalize": "^8.0.0",
"trezor-connect": "^5.0.32", "trezor-connect": "^5.0.32",

View File

@ -80,7 +80,7 @@ const ValueWrapper = styled.div`
const ArrowUp = styled.div` const ArrowUp = styled.div`
position: absolute; position: absolute;
top: 30px; top: 35px;
left: 70px; left: 70px;
width: 0; width: 0;
height: 0; height: 0;
@ -97,7 +97,7 @@ const AddressInfoText = styled.div`
margin: 0px 2px; margin: 0px 2px;
padding: 0 14px 0 5px; padding: 0 14px 0 5px;
position: absolute; position: absolute;
top: 39px; top: 45px;
background: black; background: black;
color: ${colors.WHITE}; color: ${colors.WHITE};
border-radius: 5px; border-radius: 5px;
@ -127,10 +127,10 @@ const ShowAddressIcon = styled(Icon)`
const EyeButton = styled(Button)` const EyeButton = styled(Button)`
z-index: 10001; z-index: 10001;
padding: 0; padding: 0;
width: 30px;
top: 5px;
position: absolute; position: absolute;
left: auto;
right: 10px; right: 10px;
top: 6px;
`; `;
const AccountReceive = (props: Props) => { const AccountReceive = (props: Props) => {
@ -159,7 +159,6 @@ const AccountReceive = (props: Props) => {
return ( return (
<Content> <Content>
<React.Fragment>
<H2>Receive Ethereum or tokens</H2> <H2>Receive Ethereum or tokens</H2>
<AddressWrapper <AddressWrapper
isShowingQrCode={addressVerified || addressUnverified} isShowingQrCode={addressVerified || addressUnverified}
@ -168,13 +167,8 @@ const AccountReceive = (props: Props) => {
<AddressInfoText>Confirm address on TREZOR</AddressInfoText> <AddressInfoText>Confirm address on TREZOR</AddressInfoText>
)} )}
{((addressVerified || addressUnverified) && !isAddressVerifying) && ( {((addressVerified || addressUnverified) && !isAddressVerifying) && (
<EyeButton
isTransparent
onClick={() => props.showAddress(account.addressPath)}
>
<Tooltip <Tooltip
placement="bottomRight" placement="left"
content={( content={(
<VerifyAddressTooltip <VerifyAddressTooltip
isConnected={device.connected} isConnected={device.connected}
@ -183,12 +177,18 @@ const AccountReceive = (props: Props) => {
/> />
)} )}
> >
<EyeButton
isTransparent
onClick={() => props.showAddress(account.addressPath)}
>
<Icon <Icon
icon={addressUnverified ? ICONS.EYE_CROSSED : ICONS.EYE} icon={addressUnverified ? ICONS.EYE_CROSSED : ICONS.EYE}
color={addressUnverified ? colors.ERROR_PRIMARY : colors.TEXT_PRIMARY} color={addressUnverified ? colors.ERROR_PRIMARY : colors.TEXT_PRIMARY}
/> />
</Tooltip>
</EyeButton> </EyeButton>
</Tooltip>
)} )}
<ValueWrapper <ValueWrapper
isHidden={isAddressHidden} isHidden={isAddressHidden}
@ -221,19 +221,11 @@ const AccountReceive = (props: Props) => {
</React.Fragment> </React.Fragment>
)} )}
{!(addressVerified || addressUnverified) && ( {!(addressVerified || addressUnverified) && (
<ShowAddressButton <ShowAddressButton onClick={() => props.showAddress(account.addressPath)} isDisabled={device.connected && !discovery.completed}>
onClick={() => props.showAddress(account.addressPath)} <ShowAddressIcon icon={ICONS.EYE} color={colors.WHITE} />Show full address
isDisabled={device.connected && !discovery.completed}
>
<ShowAddressIcon
icon={ICONS.EYE}
color={colors.WHITE}
/>
Show full address
</ShowAddressButton> </ShowAddressButton>
)} )}
</AddressWrapper> </AddressWrapper>
</React.Fragment>
</Content> </Content>
); );
}; };