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

bee-alert

Package Overview
Dependencies
Maintainers
10
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-alert

alert ui component for react

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
32
decreased by-25.58%
Maintainers
10
Weekly downloads
 
Created
Source

bee-alert

npm version Build Status Coverage Status

页面内部针对用户行为操作的区域性提醒。根据信息类型不同提供相应的以背景颜色区分的alert。若需背景颜色加深需加dark类。

使用

使用单独的bee-alert包

组件引入

先进行下载bee-alert包

npm install --save bee-alert

组件调用

import Alert from 'bee-alert';

React.render(<div>
    <Alert />
    <Alert colors="info" className="dark" closeLabel="close" />
</div>, document.getElementById('target'));

样式引入
  • 可以使用link引入dist目录下bee-alert.css
<link rel="stylesheet" href="./node_modules/build/bee-alert.css">
  • 可以在js中import样式
import "./node_modules/src/Alert.scss"
//或是
import "./node_modules/build/bee-alert.css"

API

参数说明类型默认值
className类名string
colorsoneOf:info news success danger warningstringwarning
controlLabel关闭按钮文字string
onDismiss关闭alert触发的方法func
开发调试
$ git clone https://github.com/tinper-bee/bee-alert
$ cd bee-alert
$ npm install
$ npm run dev

Keywords

FAQs

Package last updated on 01 Nov 2017

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