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

bee-notification

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-notification

Notification ui component for react

  • 0.2.24
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

bee-notification

npm version Build Status Coverage Status

Browser Support

IEChromeFirefoxOperaSafari
IE 9+ ✔Chrome 31.0+ ✔Firefox 31.0+ ✔Opera 30.0+ ✔Safari 7.0+ ✔

react bee-notification component for tinper-bee

Notification通知不同于操作类型的信息反馈,是一种主动推送的信息。

使用方法

const notification = Notification.newInstance({position: 'bottomRight'});

class Demo1 extends Component {

    simpleFn() {
      notification.notice({
        content: <span>simple show</span>,
        onClose() {
          console.log('simple close');
        },
      });
    }
    render () {

        return (
            <div className="demoPadding">
                <Button onClick={this.simpleFn}>simple show</Button>
            </div>
        )
    }
}

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

API

Notice
参数说明类型默认值
duration显示时间number4.5
onClose关闭时触发的钩子函数function-
closable是否可手动关闭booleantrue
color显示颜色success/info/danger/warning/dark-
Notification
参数说明类型默认值
show是否显示booleantrue
transition动画elementFade
position显示位置topRight/BottomRighttopRight
timeout延迟时间number-
onEnter开始显示时的钩子函数function-
onEntering显示时的钩子函数function-
onEntered显示完成后的钩子函数function-
onExit隐藏开始时的钩子函数function-
onExiting隐藏进行时的钩子函数function-
onExited隐藏结束时的钩子函数function-
开发调试
$ npm install -g bee-tools
$ git clone https://github.com/tinper-bee/bee-notification
$ cd bee-notification
$ npm install
$ npm run dev

Keywords

FAQs

Package last updated on 04 Sep 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