ic-react-toast
is a toast notification library for react applications.
There are four types of toast available with this package.
1. Toaster.success(msg)
2. Toaster.warning(msg)
3. Toaster.error(msg)
4. Toaster.info(msg)
$ npm install ic-react-toast
import React, { Component } from 'react';
import {ToastContainer,Toaster} from 'ic-react-toast';
// ...
render() {
return (
<div>
<button onClick={() => Toaster.success('Yay!!! You did it')}>Toast</button>
<button onClick={() => Toaster.warning('Wrong credential detected.')}>Toast</button>
<button onClick={() => Toaster.error('Cannot post data')}>Toast</button>
<button onClick={() => Toaster.info('login to start hacking.')}>Toast</button>
<ToastContainer />
</div>
);
}