diff --git a/src/components/DeviceHeader/index.js b/src/components/DeviceHeader/index.js index d1cb35ef..27d63058 100644 --- a/src/components/DeviceHeader/index.js +++ b/src/components/DeviceHeader/index.js @@ -2,9 +2,8 @@ import React from 'react'; 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 'trezor-ui-components'; +import { getStatusColor, getStatusName, getStatus } from 'utils/device'; +import { TrezorImage, colors } from 'trezor-ui-components'; import { FONT_SIZE, FONT_WEIGHT } from 'config/variables'; @@ -92,6 +91,10 @@ const Dot = styled.div` height: 10px; `; +const StyledTrezorImage = styled(TrezorImage)` + width: ${props => (props.model === 2 ? '17px' : '13px')}; +`; + const DeviceHeader = ({ isOpen, icon, @@ -117,7 +120,9 @@ const DeviceHeader = ({ > - + {device.instanceLabel} diff --git a/src/components/images/CoinLogo/index.js b/src/components/images/CoinLogo/index.js deleted file mode 100644 index 8816a799..00000000 --- a/src/components/images/CoinLogo/index.js +++ /dev/null @@ -1,42 +0,0 @@ -import React, { PureComponent } from 'react'; -import styled from 'styled-components'; -import PropTypes from 'prop-types'; - -const Wrapper = styled.div` - padding-right: 20px; - width: 40px; - display: flex; - justify-content: center; -`; - -const Logo = styled.img` - height: 23px; - display: block; -`; - -class CoinLogo extends PureComponent { - render() { - const { network, className, standalone } = this.props; - - const logo = ( - - ); - - if (standalone) { - return logo; - } - - return {logo}; - } -} - -CoinLogo.propTypes = { - network: PropTypes.string, - className: PropTypes.string, - standalone: PropTypes.bool, -}; - -export default CoinLogo; diff --git a/src/components/images/TrezorImage/images/trezor-1.png b/src/components/images/TrezorImage/images/trezor-1.png deleted file mode 100644 index 8c35659b..00000000 Binary files a/src/components/images/TrezorImage/images/trezor-1.png and /dev/null differ diff --git a/src/components/images/TrezorImage/images/trezor-T.png b/src/components/images/TrezorImage/images/trezor-T.png deleted file mode 100644 index 54fdab30..00000000 Binary files a/src/components/images/TrezorImage/images/trezor-T.png and /dev/null differ diff --git a/src/components/images/TrezorImage/index.js b/src/components/images/TrezorImage/index.js deleted file mode 100644 index 5577d6a9..00000000 --- a/src/components/images/TrezorImage/index.js +++ /dev/null @@ -1,32 +0,0 @@ -/* @flow */ - -import React from 'react'; -import styled from 'styled-components'; -import PropTypes from 'prop-types'; - -type Props = { - model: string, -}; - -const Wrapper = styled.div``; - -const Img = styled.img` - width: ${props => (props.model === 'T' ? '17px' : '13px')}; -`; - -const TrezorImage = ({ model }: Props) => { - const imageName = model === 'One' ? 1 : model; - // $FlowIssue: `require` must be a string literal. - const src = require(`./images/trezor-${imageName}.png`); // eslint-disable-line - return ( - - - - ); -}; - -TrezorImage.propTypes = { - model: PropTypes.string, -}; - -export default TrezorImage;