mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 09:18:09 +00:00
Use new Tooltip interface
This commit is contained in:
parent
4ab8a80b41
commit
6aff8ecc41
@ -1,14 +1,13 @@
|
|||||||
/* @flow */
|
/* @flow */
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import BigNumber from 'bignumber.js';
|
import BigNumber from 'bignumber.js';
|
||||||
import TooltipContent from 'components/TooltipContent';
|
|
||||||
import Icon from 'components/Icon';
|
import Icon from 'components/Icon';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
import Loader from 'components/Loader';
|
import Loader from 'components/Loader';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import styled, { css } from 'styled-components';
|
import styled, { css } from 'styled-components';
|
||||||
import * as stateUtils from 'reducers/utils';
|
import * as stateUtils from 'reducers/utils';
|
||||||
import Tooltip from 'rc-tooltip';
|
import Tooltip from 'components/Tooltip';
|
||||||
import ICONS from 'config/icons';
|
import ICONS from 'config/icons';
|
||||||
|
|
||||||
import { NavLink } from 'react-router-dom';
|
import { NavLink } from 'react-router-dom';
|
||||||
@ -204,7 +203,7 @@ const AccountMenu = (props: Props): ?React$Element<string> => {
|
|||||||
discoveryStatus = (
|
discoveryStatus = (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
arrowContent={<div className="rc-tooltip-arrow-inner" />}
|
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"
|
placement="bottom"
|
||||||
>
|
>
|
||||||
<Row>
|
<Row>
|
||||||
|
@ -7,7 +7,7 @@ import Icon from 'components/Icon';
|
|||||||
import ICONS from 'config/icons';
|
import ICONS from 'config/icons';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
|
||||||
import Tooltip from 'rc-tooltip';
|
import Tooltip from 'components/Tooltip';
|
||||||
import { QRCode } from 'react-qr-svg';
|
import { QRCode } from 'react-qr-svg';
|
||||||
|
|
||||||
import SelectedAccount from 'views/Wallet/components/SelectedAccount';
|
import SelectedAccount from 'views/Wallet/components/SelectedAccount';
|
||||||
@ -147,7 +147,6 @@ const AccountReceive = (props: Props) => {
|
|||||||
)}
|
)}
|
||||||
{((addressVerified || addressUnverified) && !isAddressVerifying) && (
|
{((addressVerified || addressUnverified) && !isAddressVerifying) && (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
arrowContent={<div className="rc-tooltip-arrow-inner" />}
|
|
||||||
placement="bottomRight"
|
placement="bottomRight"
|
||||||
overlay={(
|
overlay={(
|
||||||
<TooltipContentWrapper>
|
<TooltipContentWrapper>
|
||||||
|
@ -13,8 +13,7 @@ import colors from 'config/colors';
|
|||||||
import P from 'components/Paragraph';
|
import P from 'components/Paragraph';
|
||||||
import { H2 } from 'components/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
import Textarea from 'components/Textarea';
|
import Textarea from 'components/Textarea';
|
||||||
import Tooltip from 'rc-tooltip';
|
import Tooltip from 'components/Tooltip';
|
||||||
import TooltipContent from 'components/TooltipContent';
|
|
||||||
import { calculate, validation } from 'actions/SendFormActions';
|
import { calculate, validation } from 'actions/SendFormActions';
|
||||||
import SelectedAccount from 'views/Wallet/components/SelectedAccount';
|
import SelectedAccount from 'views/Wallet/components/SelectedAccount';
|
||||||
import type { Token } from 'flowtype';
|
import type { Token } from 'flowtype';
|
||||||
@ -463,14 +462,13 @@ class AccountSend extends Component<Props, State> {
|
|||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
Gas limit
|
Gas limit
|
||||||
<Tooltip
|
<Tooltip
|
||||||
arrowContent={<div className="rc-tooltip-arrow-inner" />}
|
content={(
|
||||||
overlay={(
|
<React.Fragment>
|
||||||
<TooltipContent>
|
|
||||||
Gas limit is the amount of gas to send with your transaction.<br />
|
Gas limit is the amount of gas to send with your transaction.<br />
|
||||||
<GreenSpan>TX fee = gas price * gas limit</GreenSpan> & is paid to miners for including your TX in a block.<br />
|
<GreenSpan>TX fee = gas price * gas limit</GreenSpan> & is paid to miners for including your TX in a block.<br />
|
||||||
Increasing this number will not get your TX mined faster.<br />
|
Increasing this number will not get your TX mined faster.<br />
|
||||||
Default value for sending {gasLimitTooltipCurrency} is <GreenSpan>{gasLimitTooltipValue}</GreenSpan>
|
Default value for sending {gasLimitTooltipCurrency} is <GreenSpan>{gasLimitTooltipValue}</GreenSpan>
|
||||||
</TooltipContent>
|
</React.Fragment>
|
||||||
)}
|
)}
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
@ -497,14 +495,13 @@ class AccountSend extends Component<Props, State> {
|
|||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
Gas price
|
Gas price
|
||||||
<Tooltip
|
<Tooltip
|
||||||
arrowContent={<div className="rc-tooltip-arrow-inner" />}
|
content={(
|
||||||
overlay={(
|
<React.Fragment>
|
||||||
<TooltipContent>
|
|
||||||
Gas Price is the amount you pay per unit of gas.<br />
|
Gas Price is the amount you pay per unit of gas.<br />
|
||||||
<GreenSpan>TX fee = gas price * gas limit</GreenSpan> & is paid to miners for including your TX in a block.<br />
|
<GreenSpan>TX fee = gas price * gas limit</GreenSpan> & 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 />
|
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>
|
<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"
|
placement="top"
|
||||||
>
|
>
|
||||||
@ -526,11 +523,10 @@ class AccountSend extends Component<Props, State> {
|
|||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
Data
|
Data
|
||||||
<Tooltip
|
<Tooltip
|
||||||
arrowContent={<div className="rc-tooltip-arrow-inner" />}
|
content={(
|
||||||
overlay={(
|
<React.Fragment>
|
||||||
<TooltipContent>
|
|
||||||
Data is usually used when you send transactions to contracts.
|
Data is usually used when you send transactions to contracts.
|
||||||
</TooltipContent>
|
</React.Fragment>
|
||||||
)}
|
)}
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { H2 } from 'components/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
import TooltipContent from 'components/TooltipContent';
|
|
||||||
import BigNumber from 'bignumber.js';
|
import BigNumber from 'bignumber.js';
|
||||||
import Icon from 'components/Icon';
|
import Icon from 'components/Icon';
|
||||||
import { AsyncSelect } from 'components/Select';
|
import { AsyncSelect } from 'components/Select';
|
||||||
@ -99,9 +98,9 @@ const AccountSummary = (props: Props) => {
|
|||||||
<Tooltip
|
<Tooltip
|
||||||
arrowContent={<div className="rc-tooltip-arrow-inner" />}
|
arrowContent={<div className="rc-tooltip-arrow-inner" />}
|
||||||
overlay={(
|
overlay={(
|
||||||
<TooltipContent>
|
<React.Fragment>
|
||||||
Insert token name, symbol or address to be able to send it.
|
Insert token name, symbol or address to be able to send it.
|
||||||
</TooltipContent>
|
</React.Fragment>
|
||||||
)}
|
)}
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user