@@ -14,7 +14,7 @@ You can import react-notification-alert in your application like so:
1414
1515After that, in your component render method add the following line:
1616
17- ` <NotificationAlert ref="notificationAlert" /> `
17+ ` <NotificationAlert ref="notificationAlert" zIndex={1031} onClick={() => console.log("hey")} /> `
1818
1919We've used ` ref="notificationAlert" ` property on the ` NotificationAlert ` tag to access this components properties.
2020
@@ -29,6 +29,12 @@ Do not forget to import our styles in your project:
2929import "react-notification-alert/dist/animate.css";
3030```
3131
32+ ## * zIndex*
33+ If you want to add a special zIndex to the notification, if not, ` 9999 ` will be set as default.
34+
35+ ## * onClick*
36+ This function will be called when the user clicks on a certain notification.
37+
3238## * options* parameter
3339
3440This parameter has to be a javascript object with the following props:
@@ -41,6 +47,7 @@ var options = {
4147 icon: ,
4248 autoDismiss: ,
4349 closeButton: ,
50+ zIndex: ,
4451}
4552```
4653
@@ -105,7 +112,7 @@ class App extends Component {
105112 render() {
106113 return (
107114 <div>
108- <NotificationAlert ref="notify" />
115+ <NotificationAlert ref="notify" zIndex={9999} onClick={() => console.log("hey")} />
109116 <button onClick={() => this.myFunc()}>Hey</button>
110117 </div>
111118 );
@@ -132,5 +139,5 @@ npm install --save jquery
132139[ CHANGELOG ] : ./CHANGELOG.md
133140
134141[ LICENSE ] : ./LICENSE.md
135- [ version-badge ] : https://img.shields.io/badge/version-0.0.12 -blue.svg
142+ [ version-badge ] : https://img.shields.io/badge/version-0.0.13 -blue.svg
136143[ license-badge ] : https://img.shields.io/badge/license-MIT-blue.svg
0 commit comments