New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@phantasweng/vue-cryptocurrency-icons

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@phantasweng/vue-cryptocurrency-icons

cryptocurrency icon component for vue3

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Vue Cryptocurrency Icons

Inheriting image resources from cryptocurrency-icons and writing a version that can be used in Vue 3.

The biggest difference is that the original cryptocurrency-icons need to import images directly from node_module, for example:

import avax from './node_modules/cryptocurrency-icons/svg/color/avax.svg'.

But in tools like Vite, it is not easy to import images directly from node_module. It requires some other configurations.

Install 🚀

$ npm install @phantasweng/vue-cryptocurrency-icons

Vue Global on main.js

import VueCryptocurrencyIcons from '@phantasweng/vue-cryptocurrency-icons'

app.use(VueCryptocurrencyIcons)

Component

<VueCryptocurrencyIcons name="Avax" />

Props

PropOptionsDefaultDescription
namebtc, eth, sol, usdc...etcnullPlease refer to the list of currency names in manifest.json.
typesvg, pngsvgImage Type
size32, 2x, 128, number (when type is png)default is 32 when type is svgIgnore when using svg. Please customize width and height with style.
themecolorblack,color, whiteicon color

Methods

icons

取得 icons list

import { icons } from '@phantasweng/vue-cryptocurrency-icons'
console.log(icons)

/**
 * [
 * 	{symbol: '$PAC', name: 'PACcoin', color: '#f5eb16'},
 *  ...
 * ]
*/

getIcon

Manually get the icon's base64

import { getIcon } from '@phantasweng/vue-cryptocurrency-icons'
getIcon({
  name: 'btc',
  type: 'svg',
  size: '32',
  theme: 'white',
}).then((res) => {
  console.log(res)
})
console.log(myIcon)
// {default: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org….45c.975.243 4.118.696 3.61 2.733z'/%3e%3c/svg%3e"}

Keywords

FAQs

Package last updated on 06 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc