Skip to content

Commit f8dd2f5

Browse files
authored
Merge pull request #13 from creativetimofficial/dev-main
Feature: update
2 parents db41f07 + a45f053 commit f8dd2f5

File tree

10 files changed

+841
-88
lines changed

10 files changed

+841
-88
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
/node_modules
22
package-lock.json
3-
/dist

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## [0.0.13] 2020-12-10
2+
### Enhancements
3+
- Add `onClick` and `zIndex` prop for better control over the notifications. Check the `README` for more information.
4+
### Bug fixing
5+
- Updated peer dependecies
6+
- https://github.com/creativetimofficial/react-notification-alert/issues/7
7+
- https://github.com/creativetimofficial/react-notification-alert/issues/8
8+
19
## [0.0.9] 2019-01-14
210
### Bug fixing
311
- Updated peer dependecies

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Creative Tim
3+
Copyright (c) 2020 Creative Tim
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You can import react-notification-alert in your application like so:
1414

1515
After 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

1919
We'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:
2929
import "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

3440
This 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

Comments
 (0)