mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 09:18:09 +00:00
Merge pull request #141 from trezor/fix/trezorimage
import trezor image
This commit is contained in:
commit
f36a67c6c6
@ -1,22 +1,31 @@
|
|||||||
|
/* @flow */
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
model: string;
|
||||||
|
}
|
||||||
|
|
||||||
const Wrapper = styled.div``;
|
const Wrapper = styled.div``;
|
||||||
|
|
||||||
const Img = styled.img`
|
const Img = styled.img`
|
||||||
width: ${props => (props.model === 'T' ? '17px' : '13px')};
|
width: ${props => (props.model === 'T' ? '17px' : '13px')};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const TrezorImage = ({ model }) => (
|
const TrezorImage = ({ model }: Props) => {
|
||||||
|
// $FlowIssue
|
||||||
|
const src = require(`./images/trezor-${model}.png`); // eslint-disable-line
|
||||||
|
return (
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<Img model={model} src={model === 'T' ? './images/trezor-T.png' : './images/trezor-1.png'} />
|
<Img model={model} src={src} />
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
|
||||||
TrezorImage.propTypes = {
|
TrezorImage.propTypes = {
|
||||||
model: PropTypes.string,
|
model: PropTypes.string,
|
||||||
status: PropTypes.string,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default TrezorImage;
|
export default TrezorImage;
|
||||||
|
Loading…
Reference in New Issue
Block a user