DefinitelyTyped/types/react-notify-toast/react-notify-toast-tests.tsx
Klaas Cuvelier 98b8fc3a97 Add type definitions for react-notify-toast (#27052)
* Add type definitions for react-notify-toast

* use 4 spaces

* add comments

* Fix issues
2018-07-05 10:09:15 -07:00

21 lines
504 B
TypeScript

import * as React from 'react';
import Notification, { notify } from 'react-notify-toast';
export class NotificationTest extends React.Component {
render() {
return(<Notification options={{zIndex: 200, top: '15px'}} />);
}
}
function testNotify() {
notify.show('show something');
notify.show('show error', 'error');
notify.show('show warning', 'warning', 100);
const queue = notify.createShowQueue();
queue.show('hi');
queue.show('test');
notify.hide();
}