Merge pull request #18672 from vincaslt/master

Add removeAll() definition to react-notification-system-redux
This commit is contained in:
Andrew Casey
2017-08-07 17:56:00 -07:00
committed by GitHub
3 changed files with 5 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
// Type definitions for react-notification-system-redux 1.0
// Type definitions for react-notification-system-redux 1.1
// Project: https://github.com/gor181/react-notification-system-redux
// Definitions by: Karol Janyst <https://github.com/LKay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -35,4 +35,5 @@ declare namespace Notifications {
const info: NotificationShow;
const success: NotificationShow;
const warning: NotificationShow;
function removeAll(): Action;
}

View File

@@ -2,4 +2,4 @@
"dependencies": {
"redux": "^3.6.0"
}
}
}

View File

@@ -2,7 +2,7 @@ import * as React from "react";
import { createStore, Store } from "redux";
import { Notification } from "react-notification-system";
import * as Notifications from "react-notification-system-redux";
import { reducer, show, hide, info, error, warning, success, NotificationLevel } from "react-notification-system-redux";
import { reducer, removeAll, show, hide, info, error, warning, success, NotificationLevel } from "react-notification-system-redux";
class Test extends React.Component {
private test() {
@@ -20,6 +20,7 @@ class Test extends React.Component {
hide(notification);
hide("uid");
hide(123);
removeAll();
}
render() {