Files
DefinitelyTyped/react-notification-system-redux/react-notification-system-redux-tests.tsx
Karol Janyst 08c8f92a86 Add definitions for react-notification-system-redux (#13431)
* Add definitions for react-notification-system-redux

* Add semicolor, add missing compiler option
2016-12-28 11:10:10 -05:00

34 lines
1020 B
TypeScript

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";
class Test extends React.Component<any, any> {
private test () {
const notification: Notification = {
message : "Test"
};
info(notification);
error(notification);
warning(notification);
success(notification);
show(notification, "info");
show(notification, "error");
show(notification, "warning");
show(notification, "success");
hide(notification);
hide("uid");
hide(123);
}
public render () {
const notifications: Notification[] = [];
return (<Notifications notifications={ notifications } />);
}
}
const store: Store<any> = createStore(reducer)