react-notification-alert
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,4 +0,8 @@ | ||
## [1.0.0] 2017-11-24 | ||
## [0.0.2] 2017-11-26 | ||
### Bug fixing | ||
- Made the icon prop to work properly | ||
## [0.0.1] 2017-11-24 | ||
### Original Release | ||
- Added Reactstrap as base framework | ||
- Added animations from animate-bootstrap-notify |
17
index.js
import React from 'react'; | ||
import { Alert, Col } from 'reactstrap'; | ||
import './animate.css'; | ||
class NotificationAlert extends React.Component { | ||
class NotificationSystem extends React.Component { | ||
constructor(props) { | ||
@@ -18,7 +16,4 @@ super(props); | ||
this.onDismiss = this.onDismiss.bind(this); | ||
this.notificationAlert = this.notificationAlert.bind(this); | ||
this.notify = this.notify.bind(this); | ||
} | ||
heyFunc(){ | ||
console.log("hey"); | ||
} | ||
onDismiss(nNumber, place, noAnimate) { | ||
@@ -63,3 +58,3 @@ | ||
} | ||
notificationAlert(options) { | ||
notify(options) { | ||
var notify = this.state["notify" + options.place.toUpperCase()]; | ||
@@ -76,4 +71,4 @@ var nNumber = notify.length; | ||
Alert, | ||
{ color: options.type, className: 'alert-with-icon animated fadeInDown', toggle: () => this.onDismiss(nNumber, options.place), key: nNumber }, | ||
React.createElement('span', { 'data-notify': 'icon', className: 'now-ui-icons ui-1_bell-53' }), | ||
{ color: options.type, className: 'alert-with-icon animated fadeInDown', closeClassName: 'now-ui-icons ui-1_simple-remove', toggle: () => this.onDismiss(nNumber, options.place), key: nNumber }, | ||
options.icon !== undefined ? React.createElement('span', { 'data-notify': 'icon', className: options.icon }) : null, | ||
React.createElement( | ||
@@ -157,2 +152,2 @@ 'span', | ||
export default NotificationAlert; | ||
export default NotificationSystem; |
{ | ||
"name": "react-notification-alert", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "React bootstrap 4 notification alert", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -67,3 +67,3 @@ # React Notification Alert | ||
This prop is used to tell the notification after how many **seconds** to auto close. | ||
If is set to a value lower than 0, then the notification will not auto close. | ||
If is set to a value lower than or equal to 0, then the notification will not auto close. | ||
@@ -126,3 +126,3 @@ ## Example code | ||
[LICENSE]: ./LICENSE.md | ||
[version-badge]: https://img.shields.io/badge/version-0.0.1-blue.svg | ||
[version-badge]: https://img.shields.io/badge/version-0.0.2-blue.svg | ||
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg |
19424
495