New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

icon-svg-component

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

icon-svg-component

icon-svg webComponent support modify color and size,and support hover-color

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
0
Created
Source

icon-svg-component

Information

  icon-svg-component webComponent 支持svg图标的颜色,大小修改,hover颜色。

Install

  npm install icon-svg-component 

Attributes

AttributeDescriptionTypeDefault
src必填,svg图标路径string-
color图标颜色string#000000
hover-color鼠标悬停颜色string#000000
width图标宽度number|string-
height图标高度number|string-

Usage

// 在框架中使用 

// main.js  eg: vue
import "icon-svg-component"

// 在组件中使用


<template>
  <icon-svg src="**/*.svg" color="#000000" hover-color="#fff"></icon-svg>
</template>


// 在html中使用
<html>
<head>
   <script src="icon-svg.min.js"></script> // 引入js文件
</head>
<body>
  <icon-svg src="**/*.svg"></icon-svg> 
   <icon-svg src="**/*.svg" color="#000000" width="20" height="20" hover-color="#fff"></icon-svg>
  <icon-svg src="**/*.svg" color="#000000" hover-color="#fff"></icon-svg> // 使用组件
</body>
</html>

Keywords

webComponent

FAQs

Package last updated on 07 Jan 2025

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