You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
505 B
22 lines
505 B
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import path from 'path'
|
|
import { FaBitcoin } from 'react-icons/lib/fa'
|
|
import Isvg from 'react-inlinesvg'
|
|
|
|
const CryptoIcon = ({ currency }) => {
|
|
switch (currency) {
|
|
case 'btc':
|
|
return <FaBitcoin />
|
|
case 'ltc':
|
|
return <Isvg src={path.join(__dirname, '..', 'resources/litecoin.svg')} />
|
|
default:
|
|
return <span />
|
|
}
|
|
}
|
|
|
|
CryptoIcon.propTypes = {
|
|
currency: PropTypes.string.isRequired
|
|
}
|
|
|
|
export default CryptoIcon
|
|
|