Skip to content

Commit e3d3932

Browse files
author
Manu
committed
fixed icon bug
1 parent 407cc30 commit e3d3932

3 files changed

Lines changed: 13 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
## [1.0.0] 2017-11-24
1+
## [0.0.2] 2017-11-26
2+
### Bug fixing
3+
- Made the icon prop to work properly
4+
5+
## [0.0.1] 2017-11-24
26
### Original Release
37
- Added Reactstrap as base framework
48
- Added animations from animate-bootstrap-notify

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ String used to add an icon to the notification.
6464

6565
### *autoDismiss*
6666
This prop is used to tell the notification after how many **seconds** to auto close.
67-
If is set to a value lower than 0, then the notification will not auto close.
67+
If is set to a value lower than or equal to 0, then the notification will not auto close.
6868

6969
## Example code
7070

@@ -122,5 +122,5 @@ Bootstrap will require the following:
122122
[CHANGELOG]: ./CHANGELOG.md
123123

124124
[LICENSE]: ./LICENSE.md
125-
[version-badge]: https://img.shields.io/badge/version-0.0.1-blue.svg
125+
[version-badge]: https://img.shields.io/badge/version-0.0.2-blue.svg
126126
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg

index.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import React from 'react';
22
import { Alert, Col } from 'reactstrap';
33

4-
import './animate.css';
5-
6-
class NotificationAlert extends React.Component {
4+
class NotificationSystem extends React.Component {
75
constructor(props) {
86
super(props);
97
this.state = {
@@ -15,10 +13,7 @@ class NotificationAlert extends React.Component {
1513
notifyBR: []
1614
};
1715
this.onDismiss = this.onDismiss.bind(this);
18-
this.notificationAlert = this.notificationAlert.bind(this);
19-
}
20-
heyFunc(){
21-
console.log("hey");
16+
this.notify = this.notify.bind(this);
2217
}
2318
onDismiss(nNumber, place, noAnimate) {
2419

@@ -59,7 +54,7 @@ class NotificationAlert extends React.Component {
5954
sNotify["notify" + place.toUpperCase()] = notify;
6055
this.setState(sNotify);
6156
}
62-
notificationAlert(options) {
57+
notify(options) {
6358
var notify = this.state["notify" + options.place.toUpperCase()];
6459
var nNumber = notify.length;
6560
if (notify.length > 0) {
@@ -71,8 +66,8 @@ class NotificationAlert extends React.Component {
7166
}
7267
var notification = React.createElement(
7368
Alert,
74-
{ color: options.type, className: 'alert-with-icon animated fadeInDown', toggle: () => this.onDismiss(nNumber, options.place), key: nNumber },
75-
React.createElement('span', { 'data-notify': 'icon', className: 'now-ui-icons ui-1_bell-53' }),
69+
{ 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 },
70+
options.icon !== undefined ? React.createElement('span', { 'data-notify': 'icon', className: options.icon }) : null,
7671
React.createElement(
7772
'span',
7873
{ 'data-notify': 'message' },
@@ -151,4 +146,4 @@ class NotificationAlert extends React.Component {
151146
}
152147
}
153148

154-
export default NotificationAlert;
149+
export default NotificationSystem;

0 commit comments

Comments
 (0)