1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-07-03 05:12:40 +00:00
trezor-wallet/src/components/images/TrezorImage/index.js
Szymon Lesisz 4730e9afc6 import trezor image
TrezorImage is missing in build because it wasn't imported properly
2018-10-09 11:54:19 +02:00

32 lines
611 B
JavaScript

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