diff --git a/src/views/Wallet/views/Account/Receive/ethereum/index.js b/src/views/Wallet/views/Account/Receive/ethereum/index.js index 5e6741c2..94aa3ddf 100644 --- a/src/views/Wallet/views/Account/Receive/ethereum/index.js +++ b/src/views/Wallet/views/Account/Receive/ethereum/index.js @@ -3,17 +3,13 @@ import React from 'react'; import { QRCode } from 'react-qr-svg'; import styled from 'styled-components'; import { FormattedMessage } from 'react-intl'; -import { Button, Icon, Tooltip, Input, icons as ICONS } from 'trezor-ui-components'; +import { Button, Icon, Tooltip, Input, colors, icons as ICONS } from 'trezor-ui-components'; import Title from 'views/Wallet/components/Title'; import DeviceIcon from 'components/images/DeviceIcon'; - -import colors from 'config/colors'; -import { CONTEXT_DEVICE } from 'actions/constants/modal'; - import Content from 'views/Wallet/components/Content'; +import { CONTEXT_DEVICE } from 'actions/constants/modal'; import l10nCommonMessages from 'views/common.messages'; import VerifyAddressTooltip from '../components/VerifyAddressTooltip'; - import l10nMessages from './index.messages'; import l10nReceiveMessages from '../common.messages'; diff --git a/src/views/Wallet/views/Account/Receive/ripple/index.js b/src/views/Wallet/views/Account/Receive/ripple/index.js index 13a97d66..2d4c5827 100644 --- a/src/views/Wallet/views/Account/Receive/ripple/index.js +++ b/src/views/Wallet/views/Account/Receive/ripple/index.js @@ -4,15 +4,10 @@ import { QRCode } from 'react-qr-svg'; import styled from 'styled-components'; import { FormattedMessage } from 'react-intl'; +import { Button, Icon, Tooltip, Input, colors, icons as ICONS } from 'trezor-ui-components'; import Title from 'views/Wallet/components/Title'; -import Button from 'components/Button'; -import Icon from 'components/Icon'; -import Tooltip from 'components/Tooltip'; -import Input from 'components/inputs/Input'; import DeviceIcon from 'components/images/DeviceIcon'; -import ICONS from 'config/icons'; -import colors from 'config/colors'; import { CONTEXT_DEVICE } from 'actions/constants/modal'; import Content from 'views/Wallet/components/Content'; @@ -179,8 +174,8 @@ const AccountReceive = (props: Props) => { props.showAddress(account.accountPath)} isDisabled={device.connected && !discovery.completed} + icon={ICONS.EYE} > - )} diff --git a/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.js b/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.js index 90f8adce..1f9e43bb 100644 --- a/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.js +++ b/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.js @@ -2,7 +2,6 @@ import * as React from 'react'; import styled from 'styled-components'; -import colors from 'config/colors'; import { FormattedMessage, injectIntl } from 'react-intl'; import { Link, @@ -10,6 +9,7 @@ import { TextArea as Textarea, Tooltip, Icon, + colors, icons as ICONS, } from 'trezor-ui-components'; import { FONT_SIZE } from 'config/variables'; diff --git a/src/views/Wallet/views/Account/Send/ethereum/index.js b/src/views/Wallet/views/Account/Send/ethereum/index.js index cb71d6a8..3c00ef22 100644 --- a/src/views/Wallet/views/Account/Send/ethereum/index.js +++ b/src/views/Wallet/views/Account/Send/ethereum/index.js @@ -3,13 +3,10 @@ import React from 'react'; import BigNumber from 'bignumber.js'; import styled, { css } from 'styled-components'; -import { Select, Button, Input, Link, Icon } from 'trezor-ui-components'; -import ICONS from 'config/icons'; +import { Select, Button, Input, Link, Icon, P, colors, icons as ICONS } from 'trezor-ui-components'; import { FONT_SIZE, FONT_WEIGHT, TRANSITION, SCREEN_SIZE } from 'config/variables'; import { FIAT_CURRENCIES } from 'config/app'; -import colors from 'config/colors'; import Title from 'views/Wallet/components/Title'; -import P from 'components/Paragraph'; import Content from 'views/Wallet/components/Content'; import * as stateUtils from 'reducers/utils'; import type { Token } from 'flowtype'; @@ -22,10 +19,6 @@ import l10nMessages from './index.messages'; import l10nSendMessages from '../../common.messages'; import type { Props } from './Container'; -// TODO: Decide on a small screen width for the whole app -// and put it inside config/variables.js -const SmallScreenWidth = '850px'; - const AmountInputLabelWrapper = styled.div` display: flex; justify-content: space-between; @@ -172,7 +165,7 @@ const ToggleAdvancedSettingsWrapper = styled.div` flex-direction: row; justify-content: space-between; - @media screen and (max-width: ${SmallScreenWidth}) { + @media screen and (max-width: ${SCREEN_SIZE.MD}) { ${props => props.isAdvancedSettingsHidden && css` @@ -194,7 +187,7 @@ const FormButtons = styled.div` display: flex; flex: 1 1; - @media screen and (max-width: ${SmallScreenWidth}) { + @media screen and (max-width: ${SCREEN_SIZE.MD}) { margin-top: ${props => (props.isAdvancedSettingsHidden ? '10px' : 0)}; } diff --git a/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.js b/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.js index 46413912..9153160d 100644 --- a/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.js +++ b/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.js @@ -3,13 +3,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import styled from 'styled-components'; -import colors from 'config/colors'; +import { Input, Tooltip, Icon, colors, icons as ICONS } from 'trezor-ui-components'; import l10nSendMessages from 'views/Wallet/views/Account/common.messages'; -import Input from 'components/inputs/Input'; -import Tooltip from 'components/Tooltip'; -import Icon from 'components/Icon'; -import ICONS from 'config/icons'; import l10nMessages from './index.messages'; import type { Props as BaseProps } from '../../Container'; diff --git a/src/views/Wallet/views/Account/Send/ripple/index.js b/src/views/Wallet/views/Account/Send/ripple/index.js index 1d705755..7c6cb272 100644 --- a/src/views/Wallet/views/Account/Send/ripple/index.js +++ b/src/views/Wallet/views/Account/Send/ripple/index.js @@ -2,18 +2,12 @@ import React from 'react'; import styled, { css } from 'styled-components'; -import { Select } from 'components/Select'; import { FormattedMessage } from 'react-intl'; -import Button from 'components/Button'; -import Input from 'components/inputs/Input'; -import Icon from 'components/Icon'; -import Link from 'components/Link'; -import ICONS from 'config/icons'; + +import { Button, Select, Input, Icon, Link, P, colors, icons as ICONS } from 'trezor-ui-components'; import { FONT_SIZE, FONT_WEIGHT, TRANSITION, SCREEN_SIZE } from 'config/variables'; import { FIAT_CURRENCIES } from 'config/app'; -import colors from 'config/colors'; import Title from 'views/Wallet/components/Title'; -import P from 'components/Paragraph'; import l10nCommonMessages from 'views/common.messages'; import Content from 'views/Wallet/components/Content'; import PendingTransactions from '../components/PendingTransactions'; @@ -24,10 +18,6 @@ import l10nSendMessages from '../../common.messages'; import type { Props } from './Container'; -// TODO: Decide on a small screen width for the whole app -// and put it inside config/variables.js -const SmallScreenWidth = '850px'; - const AmountInputLabelWrapper = styled.div` display: flex; justify-content: space-between; @@ -136,7 +126,7 @@ const ToggleAdvancedSettingsWrapper = styled.div` flex-direction: row; justify-content: space-between; - @media screen and (max-width: ${SmallScreenWidth}) { + @media screen and (max-width: ${SCREEN_SIZE.MD}) { ${props => props.isAdvancedSettingsHidden && css` @@ -158,7 +148,7 @@ const FormButtons = styled.div` display: flex; flex: 1 1; - @media screen and (max-width: ${SmallScreenWidth}) { + @media screen and (max-width: ${SCREEN_SIZE.MD}) { margin-top: ${props => (props.isAdvancedSettingsHidden ? '10px' : 0)}; } diff --git a/src/views/Wallet/views/Account/Summary/ethereum/index.js b/src/views/Wallet/views/Account/Summary/ethereum/index.js index bc0a2e3f..a0ea3f02 100644 --- a/src/views/Wallet/views/Account/Summary/ethereum/index.js +++ b/src/views/Wallet/views/Account/Summary/ethereum/index.js @@ -1,21 +1,15 @@ /* @flow */ -import styled from 'styled-components'; import React from 'react'; -import { H2 } from 'components/Heading'; +import styled from 'styled-components'; import BigNumber from 'bignumber.js'; -import Icon from 'components/Icon'; -import { AsyncSelect } from 'components/Select'; -import ICONS from 'config/icons'; -import colors from 'config/colors'; -import Tooltip from 'components/Tooltip'; -import Content from 'views/Wallet/components/Content'; +import * as stateUtils from 'reducers/utils'; import { FormattedMessage } from 'react-intl'; -import l10nCommonMessages from 'views/common.messages'; +import { H5, Icon, Link, AsyncSelect, Tooltip, colors, icons as ICONS } from 'trezor-ui-components'; +import Content from 'views/Wallet/components/Content'; import CoinLogo from 'components/images/CoinLogo'; -import * as stateUtils from 'reducers/utils'; -import Link from 'components/Link'; import { FONT_WEIGHT, FONT_SIZE } from 'config/variables'; +import l10nCommonMessages from 'views/common.messages'; import l10nSummaryMessages from '../common.messages'; import AccountBalance from '../components/Balance'; import AddedToken from '../components/Token'; @@ -30,17 +24,12 @@ const AccountHeading = styled.div` align-items: center; `; -const H2Wrapper = styled.div` +const TokensHeadingWrapper = styled.div` display: flex; align-items: center; padding: 20px 0; `; -const StyledTooltip = styled(Tooltip)` - position: relative; - top: 2px; -`; - const AccountName = styled.div` display: flex; justify-content: center; @@ -62,6 +51,10 @@ const StyledIcon = styled(Icon)` } `; +const StyledLink = styled(Link)` + font-size: ${FONT_SIZE.SMALL}; +`; + const AsyncSelectWrapper = styled.div` padding-bottom: 32px; `; @@ -94,11 +87,11 @@ const AccountSummary = (props: Props) => { /> - + - + { fiat={props.fiat} localCurrency={props.wallet.localCurrency} /> - -

+ +
-
- + - - + +
{ localCurrency={props.wallet.localCurrency} /> {TMP_SHOW_HISTORY && ( - -

+ +
-
- +

+ )}