# eaze-alert

> Styled alert component for virtual-dom

Latest version **1.1.0** (published 2015-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install eaze-alert
pnpm add eaze-alert
yarn add eaze-alert
bun add eaze-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 | 1.1.0 |
| Published | 2015-09-24 |
| First published | 2015-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 12 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ben Drucker |
| Maintainers | bendrucker |
| Keywords | eaze, alert, component |

## Links

- npm: https://www.npmjs.com/package/eaze-alert
- Repository: https://github.com/eaze/eaze-alert
- Homepage: https://github.com/eaze/eaze-alert#readme
- Issues: https://github.com/eaze/eaze-alert/issues
- npm.io page: https://npm.io/package/eaze-alert

## Dependencies (12)

- [dover](https://npm.io/package/dover.md) ~1.1.0
- [xtend](https://npm.io/package/xtend.md) ~4.0.0
- [observ](https://npm.io/package/observ.md) ~0.2.0
- [map-values](https://npm.io/package/map-values.md) ~1.0.1
- [value-pipe](https://npm.io/package/value-pipe.md) ~1.0.0
- [color-style](https://npm.io/package/color-style.md) ~1.0.0
- [observ-enum](https://npm.io/package/observ-enum.md) ~1.0.0
- [value-event](https://npm.io/package/value-event.md) ~5.1.0
- [virtual-dom](https://npm.io/package/virtual-dom.md) ^2.0.0
- [observ-value](https://npm.io/package/observ-value.md) ~1.0.0
- [observ-mobile](https://npm.io/package/observ-mobile.md) ~2.0.0
- [create-svg-size](https://npm.io/package/create-svg-size.md) ~1.0.0

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2015-09-24
- 1.0.0 — 2015-09-19

## README

# eaze-alert [![Build Status](https://travis-ci.org/eaze/eaze-alert.svg?branch=master)](https://travis-ci.org/eaze/eaze-alert)

> Styled alert component for virtual-dom


## Install

```
$ npm install --save eaze-alert
```


## Usage

```js
var Alert = require('eaze-alert')
var error = Alert({type: 'error'})
Alert.render(error, 'Something broke!')
//=> <alert ...>Something broke!</alert>
```

## API

#### `Alert([data])` -> `function`

##### data

*Required*  
Type: `object`

Initial alert data:

###### type

Type: `string`  
Default: `basic`

You can use `basic`, `info`, `success`, `warning`, and `error`.

###### closable

Type: `boolean`  
Default: `false`

When `true`, the alert shows a close button in the top right.

###### open

Type: `boolean`  
Default: `false`

When `true`, show the alert. 

###### mobile

Type: `boolean`  
Default: `false`

A mobile viewport state managed by [observ-mobile](https://github.com/bendrucker/observ-mobile).

#### `Alert.render(state, content)` -> `vtree`

Render an alert using its state and the desired content. 

##### state

*Required*  
Type: `function`

The observable state returned from `Alert`.

##### content

*Required*  
Type: `string` / `vtree` / `function`

Any valid [virtual hyperscript](https://github.com/Matt-Esch/virtual-dom/tree/master/virtual-hyperscript) content or a function that will be called to get the content.


## License

MIT © [Ben Drucker](http://bendrucker.me)

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