File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -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" zIndex=" 1031" /> `
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,9 +29,12 @@ Do not forget to import our styles in your project:
2929import "react-notification-alert/dist/animate.css";
3030```
3131
32- ### * zIndex*
32+ ## * zIndex*
3333If you want to add a special zIndex to the notification, if not, ` 9999 ` will be set as default.
3434
35+ ## * onClick*
36+ This function will be called when the user clicks on a certain notification.
37+
3538## * options* parameter
3639
3740This parameter has to be a javascript object with the following props:
@@ -109,7 +112,7 @@ class App extends Component {
109112 render() {
110113 return (
111114 <div>
112- <NotificationAlert ref="notify" />
115+ <NotificationAlert ref="notify" zIndex={9999} onClick={() => console.log("hey")} />
113116 <button onClick={() => this.myFunc()}>Hey</button>
114117 </div>
115118 );
You can’t perform that action at this time.
0 commit comments