Coder Social home page Coder Social logo

man15h / vue-cryptoicon Goto Github PK

View Code? Open in Web Editor NEW
99.0 99.0 27.0 1.36 MB

Cryptocurrency icons for your next Vue project

Home Page: https://vue-cryptoicon.netlify.com/

License: MIT License

JavaScript 92.50% HTML 0.26% Vue 6.47% SCSS 0.78%
bitcoin components cryptocurrency ethereum fiat icons iconset vue vue-components vue-icons vuejs

vue-cryptoicon's People

Contributors

man15h avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-cryptoicon's Issues

Shouldn't it return generic icon if symbol not found

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:

CryptoIcon.vue

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.

vue2, webpack & typescript support: Could not find a declaration file for module 'vue-cryptoicon/src/icons'

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'

How to check if an icon exists?

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.

Missing lib folder in new release

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.

Integration in Nuxt 3

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)
})

?

Screenshot 2023-01-06 at 19 05 21

Some of icons not found

Some of the icons not found , Could you add all icons or return default icon if the icon not exist

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.