From 662448d8faa0595ab3cfc66feb18580b1c6730c0 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Tue, 19 Mar 2019 10:16:18 +0100 Subject: [PATCH] more trezor-ui-components --- src/components/DeviceHeader/index.js | 3 ++- src/components/Header/components/LanguagePicker/index.js | 2 +- src/components/images/WalletType/index.js | 3 +-- src/utils/__tests__/device.test.js | 2 +- src/utils/__tests__/notification.test.js | 3 +-- .../views/Account/Summary/components/Balance/index.js | 6 ++---- .../Account/Summary/ripple/components/Balance/index.js | 5 +---- src/views/Wallet/views/Acquire/index.js | 3 +-- src/views/Wallet/views/WalletSettings/index.js | 6 +----- 9 files changed, 11 insertions(+), 22 deletions(-) diff --git a/src/components/DeviceHeader/index.js b/src/components/DeviceHeader/index.js index ab21dc26..bef11993 100644 --- a/src/components/DeviceHeader/index.js +++ b/src/components/DeviceHeader/index.js @@ -4,7 +4,8 @@ import styled, { css } from 'styled-components'; import PropTypes from 'prop-types'; import { getStatusColor, getStatusName, getStatus, getVersion } from 'utils/device'; import TrezorImage from 'components/images/TrezorImage'; -import colors from 'config/colors'; +import { colors } from 'trezor-ui-components'; + import { FONT_SIZE, FONT_WEIGHT } from 'config/variables'; const Wrapper = styled.div` diff --git a/src/components/Header/components/LanguagePicker/index.js b/src/components/Header/components/LanguagePicker/index.js index 8947373c..33f0f0f4 100644 --- a/src/components/Header/components/LanguagePicker/index.js +++ b/src/components/Header/components/LanguagePicker/index.js @@ -1,7 +1,7 @@ /* @flow */ import * as React from 'react'; import styled from 'styled-components'; -import colors from 'config/colors'; +import { colors } from 'trezor-ui-components'; import ReactSelect from 'react-select'; import { SCREEN_SIZE } from 'config/variables'; import { LANGUAGE } from 'config/app'; diff --git a/src/components/images/WalletType/index.js b/src/components/images/WalletType/index.js index 7796bf2e..f5910d73 100644 --- a/src/components/images/WalletType/index.js +++ b/src/components/images/WalletType/index.js @@ -1,8 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import colors from 'config/colors'; +import { colors, icons as ICONS } from 'trezor-ui-components'; import styled from 'styled-components'; -import ICONS from 'config/icons'; const SvgWrapper = styled.svg` :hover { diff --git a/src/utils/__tests__/device.test.js b/src/utils/__tests__/device.test.js index 7818fd97..deac57d6 100644 --- a/src/utils/__tests__/device.test.js +++ b/src/utils/__tests__/device.test.js @@ -1,5 +1,5 @@ import * as utils from 'utils/device'; -import colors from 'config/colors'; +import { colors } from 'trezor-ui-components'; describe('device utils', () => { it('get status', () => { diff --git a/src/utils/__tests__/notification.test.js b/src/utils/__tests__/notification.test.js index d2a076a1..c2ef912d 100644 --- a/src/utils/__tests__/notification.test.js +++ b/src/utils/__tests__/notification.test.js @@ -1,6 +1,5 @@ import * as utils from 'utils/notification'; -import colors from 'config/colors'; -import icons from 'config/icons'; +import { colors, icons } from 'trezor-ui-components'; describe('notification utils', () => { it('get primary color from status', () => { diff --git a/src/views/Wallet/views/Account/Summary/components/Balance/index.js b/src/views/Wallet/views/Account/Summary/components/Balance/index.js index f20a4d7a..ca0475a1 100644 --- a/src/views/Wallet/views/Account/Summary/components/Balance/index.js +++ b/src/views/Wallet/views/Account/Summary/components/Balance/index.js @@ -3,10 +3,8 @@ import React, { PureComponent } from 'react'; import { FormattedMessage, FormattedNumber } from 'react-intl'; import BigNumber from 'bignumber.js'; import styled from 'styled-components'; -import Icon from 'components/Icon'; -import colors from 'config/colors'; -import ICONS from 'config/icons'; -import Tooltip from 'components/Tooltip'; +import { Icon, Tooltip, colors, icons as ICONS } from 'trezor-ui-components'; + import { toFiatCurrency } from 'utils/fiatConverter'; import { FONT_SIZE, FONT_WEIGHT } from 'config/variables'; import type { Network, State as ReducersState } from 'flowtype'; diff --git a/src/views/Wallet/views/Account/Summary/ripple/components/Balance/index.js b/src/views/Wallet/views/Account/Summary/ripple/components/Balance/index.js index df8e6385..f8ee6f06 100644 --- a/src/views/Wallet/views/Account/Summary/ripple/components/Balance/index.js +++ b/src/views/Wallet/views/Account/Summary/ripple/components/Balance/index.js @@ -2,12 +2,9 @@ import React, { PureComponent } from 'react'; import BigNumber from 'bignumber.js'; import styled from 'styled-components'; -import Icon from 'components/Icon'; -import colors from 'config/colors'; -import ICONS from 'config/icons'; +import { Icon, Tooltip, colors, icons as ICONS } from 'trezor-ui-components'; import { FormattedMessage, FormattedNumber } from 'react-intl'; import { FONT_SIZE, FONT_WEIGHT } from 'config/variables'; -import Tooltip from 'components/Tooltip'; import type { Network, State as ReducersState } from 'flowtype'; import l10nMessages from '../../../components/Balance/index.messages'; diff --git a/src/views/Wallet/views/Acquire/index.js b/src/views/Wallet/views/Acquire/index.js index 3c9f2714..aff611fe 100644 --- a/src/views/Wallet/views/Acquire/index.js +++ b/src/views/Wallet/views/Acquire/index.js @@ -5,8 +5,7 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { injectIntl } from 'react-intl'; -import colors from 'config/colors'; -import Notification from 'components/Notification'; +import { colors, Notification } from 'trezor-ui-components'; import * as TrezorConnectActions from 'actions/TrezorConnectActions'; import type { State, Dispatch } from 'flowtype'; import l10nMessages from './index.messages'; diff --git a/src/views/Wallet/views/WalletSettings/index.js b/src/views/Wallet/views/WalletSettings/index.js index 56fc65eb..7f482e7c 100644 --- a/src/views/Wallet/views/WalletSettings/index.js +++ b/src/views/Wallet/views/WalletSettings/index.js @@ -2,13 +2,9 @@ import styled from 'styled-components'; import React from 'react'; import { FormattedMessage } from 'react-intl'; - -import Link from 'components/Link'; +import { Button, Link, Select, colors } from 'trezor-ui-components'; import Content from 'views/Wallet/components/Content'; -import { Select } from 'components/Select'; -import Button from 'components/Button'; -import colors from 'config/colors'; import { FIAT_CURRENCIES } from 'config/app'; import { FONT_SIZE } from 'config/variables'; import l10nCommonMessages from 'views/common.messages';