man15h / vue-cryptoicon Goto Github PK
View Code? Open in Web Editor NEWCryptocurrency icons for your next Vue project
Home Page: https://vue-cryptoicon.netlify.com/
License: MIT License
Cryptocurrency icons for your next Vue project
Home Page: https://vue-cryptoicon.netlify.com/
License: MIT License
There is a new version available :)
https://github.com/spothq/cryptocurrency-icons/releases/tag/v0.17.1
Generally, its a good idea if a symbol isn't present to return a generic icon. I do see you have written a code for this here:
I think when someone is iterating over lots of symbols and if the symbol isn't found in this library it should return generic but as of now, I get an error in console.
Maybe we should remove that else part and return generic, If you agree I can raise a PR for that.
okb - https://www.okex.com/okb
nera - https://near.org/
hbar - https://hedera.com/
flow - https://www.onflow.org/
perp - https://www.perp.fi/
dydx - https://dydx.exchange/
webpack compiled with 1 error
ERROR in src/main.ts:9:18
TS7016: Could not find a declaration file for module 'vue-cryptoicon/src/icons'. '/Users/derek/Sites/metaspan/demo/node_modules/vue-cryptoicon/src/icons/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/vue-cryptoicon` if it exists or add a new declaration (.d.ts) file containing `declare module 'vue-cryptoicon/src/icons';`
7 | // import Cryptoicon from 'vue-cryptoicon'
8 | const Cryptoicon = require('vue-cryptoicon')
> 9 | import icon from 'vue-cryptoicon/src/icons'
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
10 | Cryptoicon.add(icon)
11 | Vue.use(Cryptoicon)
12 |
I simply added this file in same directory as main.ts:
shims-cryptoicon.d.ts
declare module 'vue-cryptoicon'
declare module 'vue-cryptoicon/src/icons'
I added cryptoicon to my app but I get the error mentioned in the title.
It can be resolved by renaming index.js to index.mjs
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.
Hi there!
I had to revert back to 0.1.6 as all the new releases are missing the built lib folder and it results in dependency not found during the compilation of my app.
I have trouble getting it to work with Nuxt 3.
Should it not be registered in a plugin like:
import Cryptoicon from 'vue-cryptoicon'
import icon from 'vue-cryptoicon/src/icons'
import { defineNuxtPlugin } from '#app'
export default defineNuxtPlugin((nuxtApp) => {
Cryptoicon.add(icon)
nuxtApp.vueApp.use(Cryptoicon)
})
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.