Socket
Socket
Sign inDemoInstall

@hecom/badge

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @hecom/badge

Badge UI Component


Version published
Maintainers
1
Created

Readme

Source

Badge

npm version Build Status

这是一个角标的UI组件,有四种可能:

  • 没有数字,只有一个圆圈,有外层隔离间隔。
  • 没有数字,只有一个圆圈,无外层隔离间隔。
  • 有数字,有外层隔离间隔。
  • 有数字,无外层隔离间隔。

外层隔离间隔,是在数字视图外面再多上一层间隔,比如红色中心圆圈外面有一圈白色间隔。

属性

  • count: number:展示的数字。
  • maxCount: number:计数的最大值,如"99"。如果比最大值大,则显示"99+"。
  • radius: number:数字两侧的圆角的半径大小。
  • bgColor: string:数字的背景色。
  • outSpace: number:外层与内层直接的间隔。
  • outBgColor: string:外层的背景色。
  • innerVerticalSpace: number:数字与内层圆圈的上下边距,用于计算字号。
  • style: any:自定义外部样式。

FAQs

Last updated on 19 Apr 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc