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

Make props not mandatory

This commit is contained in:
Vasek Mlejnsky 2018-08-27 12:38:31 +02:00
parent 47f96d7128
commit 85df75c8c5
3 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ const CoinLogo = ({
return ( return (
<Logo <Logo
className={className} className={className}
coinImg={coinImg || coinImgUrl} coinImg={coinImgName ? coinImgUrl : coinImg}
/> />
); );
}; };
@ -35,7 +35,7 @@ const CoinLogo = ({
CoinLogo.propTypes = { CoinLogo.propTypes = {
className: PropTypes.string, className: PropTypes.string,
coinImg: PropTypes.string, coinImg: PropTypes.string,
coinNetwork: PropTypes.string.isRequired, coinNetwork: PropTypes.string,
}; };
export default CoinLogo; export default CoinLogo;

View File

@ -28,7 +28,7 @@ P.propTypes = {
children: PropTypes.oneOfType([ children: PropTypes.oneOfType([
PropTypes.array, PropTypes.array,
PropTypes.string, PropTypes.string,
]).isRequired, ]),
}; };
export default P; export default P;

View File

@ -83,7 +83,7 @@ const iconShape = {
RowCoin.propTypes = { RowCoin.propTypes = {
coin: PropTypes.shape({ coin: PropTypes.shape({
name: PropTypes.string.isRequired, name: PropTypes.string.isRequired,
network: PropTypes.string.isRequired, network: PropTypes.string,
img: PropTypes.string, img: PropTypes.string,
}).isRequired, }).isRequired,
iconLeft: PropTypes.shape(iconShape), iconLeft: PropTypes.shape(iconShape),