1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-25 16:38:08 +00:00

Use new Tooltip interface

This commit is contained in:
Vasek Mlejnsky 2018-09-05 12:37:52 +02:00
parent 4ab8a80b41
commit 6aff8ecc41
4 changed files with 15 additions and 22 deletions

View File

@ -1,14 +1,13 @@
/* @flow */
import React from 'react';
import BigNumber from 'bignumber.js';
import TooltipContent from 'components/TooltipContent';
import Icon from 'components/Icon';
import colors from 'config/colors';
import Loader from 'components/Loader';
import PropTypes from 'prop-types';
import styled, { css } from 'styled-components';
import * as stateUtils from 'reducers/utils';
import Tooltip from 'rc-tooltip';
import Tooltip from 'components/Tooltip';
import ICONS from 'config/icons';
import { NavLink } from 'react-router-dom';
@ -204,7 +203,7 @@ const AccountMenu = (props: Props): ?React$Element<string> => {
discoveryStatus = (
<Tooltip
arrowContent={<div className="rc-tooltip-arrow-inner" />}
overlay={<TooltipContent isAside>To add a new account, last account must have some transactions.</TooltipContent>}
content={<React.Fragment>To add a new account, last account must have some transactions.</React.Fragment>}
placement="bottom"
>
<Row>

View File

@ -7,7 +7,7 @@ import Icon from 'components/Icon';
import ICONS from 'config/icons';
import colors from 'config/colors';
import Tooltip from 'rc-tooltip';
import Tooltip from 'components/Tooltip';
import { QRCode } from 'react-qr-svg';
import SelectedAccount from 'views/Wallet/components/SelectedAccount';
@ -147,7 +147,6 @@ const AccountReceive = (props: Props) => {
)}
{((addressVerified || addressUnverified) && !isAddressVerifying) && (
<Tooltip
arrowContent={<div className="rc-tooltip-arrow-inner" />}
placement="bottomRight"
overlay={(
<TooltipContentWrapper>

View File

@ -13,8 +13,7 @@ import colors from 'config/colors';
import P from 'components/Paragraph';
import { H2 } from 'components/Heading';
import Textarea from 'components/Textarea';
import Tooltip from 'rc-tooltip';
import TooltipContent from 'components/TooltipContent';
import Tooltip from 'components/Tooltip';
import { calculate, validation } from 'actions/SendFormActions';
import SelectedAccount from 'views/Wallet/components/SelectedAccount';
import type { Token } from 'flowtype';
@ -463,14 +462,13 @@ class AccountSend extends Component<Props, State> {
<React.Fragment>
Gas limit
<Tooltip
arrowContent={<div className="rc-tooltip-arrow-inner" />}
overlay={(
<TooltipContent>
content={(
<React.Fragment>
Gas limit is the amount of gas to send with your transaction.<br />
<GreenSpan>TX fee = gas price * gas limit</GreenSpan> &amp; is paid to miners for including your TX in a block.<br />
Increasing this number will not get your TX mined faster.<br />
Default value for sending {gasLimitTooltipCurrency} is <GreenSpan>{gasLimitTooltipValue}</GreenSpan>
</TooltipContent>
</React.Fragment>
)}
placement="top"
>
@ -497,14 +495,13 @@ class AccountSend extends Component<Props, State> {
<React.Fragment>
Gas price
<Tooltip
arrowContent={<div className="rc-tooltip-arrow-inner" />}
overlay={(
<TooltipContent>
content={(
<React.Fragment>
Gas Price is the amount you pay per unit of gas.<br />
<GreenSpan>TX fee = gas price * gas limit</GreenSpan> &amp; is paid to miners for including your TX in a block.<br />
Higher the gas price = faster transaction, but more expensive. Recommended is <GreenSpan>{recommendedGasPrice} GWEI.</GreenSpan><br />
<Link href="https://myetherwallet.github.io/knowledge-base/gas/what-is-gas-ethereum.html" target="_blank" rel="noreferrer noopener" isGreen>Read more</Link>
</TooltipContent>
</React.Fragment>
)}
placement="top"
>
@ -526,11 +523,10 @@ class AccountSend extends Component<Props, State> {
<React.Fragment>
Data
<Tooltip
arrowContent={<div className="rc-tooltip-arrow-inner" />}
overlay={(
<TooltipContent>
content={(
<React.Fragment>
Data is usually used when you send transactions to contracts.
</TooltipContent>
</React.Fragment>
)}
placement="top"
>

View File

@ -2,7 +2,6 @@
import styled from 'styled-components';
import React from 'react';
import { H2 } from 'components/Heading';
import TooltipContent from 'components/TooltipContent';
import BigNumber from 'bignumber.js';
import Icon from 'components/Icon';
import { AsyncSelect } from 'components/Select';
@ -99,9 +98,9 @@ const AccountSummary = (props: Props) => {
<Tooltip
arrowContent={<div className="rc-tooltip-arrow-inner" />}
overlay={(
<TooltipContent>
<React.Fragment>
Insert token name, symbol or address to be able to send it.
</TooltipContent>
</React.Fragment>
)}
placement="top"
>