diff --git a/.npmignore b/.npmignore index 4d72aac..db02be7 100644 --- a/.npmignore +++ b/.npmignore @@ -11,5 +11,4 @@ devServer.js tests.webpack.js .travis.yml .editorconfig -.eslintignore -.eslintrc +*.log diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a84ebd..c685a19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## 0.2.5 - Oct 15, 2015 + +**Implemented enhancements:** + +* Action property no longer needs a callback, just a label. + ## 0.2.4 - Oct 12, 2015 **Implemented enhancements:** diff --git a/README.md b/README.md index 5d6aa2f..9be7398 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ The notification object has the following properties: | position | string | tr | Position of the notification. Available: **tr (top right)**, **tl (top left)**, **tc (top center)**, **br (bottom right)**, **bl (bottom left)**, **bc (bottom center)** | | autoDismiss | integer | 5 | Delay in seconds for the notification go away. Set this to **0** to not auto-dismiss the notification | | dismissible | bool | true | Set if notification is dismissible by the user. [See more](#dismissible) | -| action | object | null | Add a button with label and callback function. [See more](#action) | +| action | object | null | Add a button with label and callback function (callback is optional). [See more](#action) | | onAdd | function | null | A callback function that will be called when the notification is successfully added. The first argument is the original notification e.g. `function (notification) { console.log(notification.title + 'was added'); }` | | onRemove | function | null | A callback function that will be called when the notification is about to be removed. The first argument is the original notification e.g. `function (notification) { console.log(notification.title + 'was removed'); }` | | uid | integer/string | null | Overrides the internal `uid`. Useful if you are managing your notifications id. Notifications with same `uid` won't be displayed. | @@ -114,7 +114,7 @@ If set to false, the notification will not display the dismiss ('x') button and ### Action -Add a button and a callback function to the notification. If this button is clicked, the callback function is called and the notification is dismissed. +Add a button and a callback function to the notification. If this button is clicked, the callback function is called (if provided) and the notification is dismissed. ```js notification = { diff --git a/example/src/images/congruent_pentagon.png b/example/src/images/congruent_pentagon.png index c712660..cac34ea 100644 Binary files a/example/src/images/congruent_pentagon.png and b/example/src/images/congruent_pentagon.png differ diff --git a/example/src/images/footer_lodyas.png b/example/src/images/footer_lodyas.png deleted file mode 100644 index 8b1d392..0000000 Binary files a/example/src/images/footer_lodyas.png and /dev/null differ diff --git a/example/src/scripts/App.jsx b/example/src/scripts/App.jsx index 4d9f0d5..08d03ae 100644 --- a/example/src/scripts/App.jsx +++ b/example/src/scripts/App.jsx @@ -123,9 +123,10 @@ NotificationSystemExample = React.createClass({