# bee-alert

> alert ui component for react

Latest version **2.0.1** (published 2020-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install bee-alert
pnpm add bee-alert
yarn add bee-alert
bun add bee-alert
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2020-04-24 |
| First published | 2016-11-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 4 |
| Unpacked size | 16.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ahua52, banyudu, bjyxszd, guoyongfeng, huayingjie, jonyw, kvkens, liushaozhen, liuyk, npm_yx, tinper-bot, whizbz, yangchch, yonyoufed, zhaoyuchief |
| Keywords | react, react-component, react-alert, iuap-design, neoui-react, alert |

## Links

- npm: https://www.npmjs.com/package/bee-alert
- Repository: https://github.com/tinper-bee/alert
- Issues: https://github.com/tinper-bee/alert/issues
- npm.io page: https://npm.io/package/bee-alert

## Dependencies (4)

- [bee-icon](https://npm.io/package/bee-icon.md) ^1.0.2
- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.25.0
- [tinper-bee-core](https://npm.io/package/tinper-bee-core.md) latest

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2020-04-24
- 2.0.0 — 2019-02-28
- 1.0.2 — 2017-11-23
- 1.0.1 — 2017-11-01
- 1.0.0 — 2017-10-20
- 0.1.8 — 2017-10-12
- 0.1.7 — 2017-08-29
- 0.1.6 — 2017-08-08
- 0.1.5 — 2017-01-09
- 0.1.4 — 2016-12-29
- 0.1.3 — 2016-12-27
- 0.1.2 — 2016-12-20
- 0.1.1 — 2016-12-19
- 0.1.0 — 2016-11-22
- 0.0.3 — 2016-11-03
- … 1 more at https://npm.io/package/bee-alert/versions

## README

# bee-alert
[![npm version](https://img.shields.io/npm/v/bee-alert.svg)](https://www.npmjs.com/package/bee-alert)
[![Build Status](https://img.shields.io/travis/tinper-bee/bee-alert/master.svg)](https://travis-ci.org/tinper-bee/bee-alert)
[![Coverage Status](https://coveralls.io/repos/github/tinper-bee/bee-alert/badge.svg?branch=master)](https://coveralls.io/github/tinper-bee/bee-alert?branch=master)


页面内部针对用户行为操作的区域性提醒。根据信息类型不同提供相应的以背景颜色区分的alert。若需背景颜色加深需加`dark`类。

## 使用

使用单独的bee-alert包
#### 组件引入
先进行下载bee-alert包

```
npm install --save bee-alert
```
组件调用
```js
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样式
```js
import "./node_modules/src/Alert.scss"
//或是
import "./node_modules/build/bee-alert.css"
```




## API

|参数|说明|类型|默认值|
|:--|:---:|:--:|---:|
|className|类名|string||
|colors|oneOf:`info` `news` `success` `danger` `warning`|string|`warning`|
|controlLabel|关闭按钮文字|string||
|onDismiss|关闭alert触发的方法|func||
|dark|显示颜色深度|bool|false|


#### 开发调试

```sh
$ git clone https://github.com/tinper-bee/bee-alert
$ cd bee-alert
$ npm install
$ npm run dev
```

---
_Source: https://npm.io/package/bee-alert · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
