import trezor image

TrezorImage is missing in build because it wasn't imported properly
pull/141/head
Szymon Lesisz 6 years ago
parent 95c3c8dba7
commit 4730e9afc6

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

Loading…
Cancel
Save