jackmallers
7 years ago
committed by
GitHub
5 changed files with 24 additions and 10 deletions
@ -0,0 +1,16 @@ |
|||
import React from 'react' |
|||
import PropTypes from 'prop-types' |
|||
import { FaDollar } from 'react-icons/lib/fa' |
|||
import CryptoIcon from '../CryptoIcon' |
|||
|
|||
const CurrencyIcon = ({ currency, crypto }) => (currency === 'usd' ? |
|||
<FaDollar /> |
|||
: |
|||
<CryptoIcon currency={crypto} />) |
|||
|
|||
CurrencyIcon.propTypes = { |
|||
currency: PropTypes.string.isRequired, |
|||
crypto: PropTypes.string.isRequired |
|||
} |
|||
|
|||
export default CurrencyIcon |
@ -0,0 +1,3 @@ |
|||
import CurrencyIcon from './CurrencyIcon' |
|||
|
|||
export default CurrencyIcon |
Loading…
Reference in new issue