man15h / vue-cryptoicon

Cryptocurrency icons for your next Vue project
https://vue-cryptoicon.netlify.com/
MIT License
101 stars 28 forks source link

How to check if an icon exists? #8

Open ribrewguy opened 3 years ago

ribrewguy commented 3 years ago

I'm currently getting a lot of Symbol of the icon is not correct: SOME_ICON error messages. Also, the element takes of space even if nothing is displayed. I'd like to be able to conditionally check if the coin is supported and conditionally render the element.

dcolley commented 3 years ago

To pick up the default icon, add generic to <cryptoicon :symbol="token.symbol" generic size="24" />

Here you can see OKB & HBAR picking up the generic icon. image