Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

salt-icon

Package Overview
Dependencies
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

salt-icon

tingle-icon component for tingle.

  • 3.8.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
28
decreased by-53.33%
Maintainers
3
Weekly downloads
 
Created
Source

salt-icon

预览

image

Install

tnpm install salt-icon --save

使用

  • 方式一(推荐):
import Eye from 'salt-icon/lib/Eye';

render() {
    return <Eye />
}
  • 方式二:
import Icon from 'salt-icon';

render() {
    return <Icon name='icon-name'/>
}
  • 方法三:(不推荐)
import Icon from 'salt-icon/dist/Symbol';

render() {
    return <Icon name='icon-name'/>
}

使用 symbol & use 的方式使用 Icon,主要是为了兼容老的方案

Props

className

描述:自定义的扩展样式名称

类型:String

默认:''

name

描述:icon所对应的svg文件的命名。

注意:写名称即可,不是写路径。

类型:String

默认:''

fill

描述:icon 颜色

类型:String

默认:'#000'

width

描述:icon 宽度

类型:Number/String

默认:'32px'

height

描述:icon 高度

类型:Number/String

默认:'32px'

onClick

描述:事件

类型:Function

默认:() => {}

  • Issues

Keywords

FAQs

Package last updated on 14 Apr 2020

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