1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 09:18:09 +00:00

import trezor image

TrezorImage is missing in build because it wasn't imported properly
This commit is contained in:
Szymon Lesisz 2018-10-09 11:54:19 +02:00
parent 95c3c8dba7
commit 4730e9afc6

View File

@ -1,22 +1,31 @@
/* @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 }) => (
<Wrapper>
<Img model={model} src={model === 'T' ? './images/trezor-T.png' : './images/trezor-1.png'} />
</Wrapper>
);
const TrezorImage = ({ model }: Props) => {
// $FlowIssue
const src = require(`./images/trezor-${model}.png`); // eslint-disable-line
return (
<Wrapper>
<Img model={model} src={src} />
</Wrapper>
);
};
TrezorImage.propTypes = {
model: PropTypes.string,
status: PropTypes.string,
};
export default TrezorImage;