- Plug & Play. No configuration required
~ 4K Gzipped (All Inclusive of Icons, Styles, & Code)
- Completely Customizable
- Built with React
npm install --save @successtar/cogo-toastyarn add @successtar/cogo-toast
import cogoToast from '@successtar/cogo-toast';cogoToast.success("Success!");
cogoToast is built using React. Which means any valid jsx can be used as the message in cogoToast
cogoToast.info(<div><b>Awesome!</b><div>Isn't it?</div></div>);
Returns a promise which resolves when the toast is about to hide.
This can be useful to do some action when the toast has completed showing.
cogoToast.loading('Loading your data...').then(() => {cogoToast.success('Data Successfully Loaded');});
When hideAfter = 0, It returns a callback function that hides the toast, instead of a promise.
The package contains the minified build file, along with the SVG Icons and the Styles
Built into the Code, with a total of ~4K Gzipped
Made with at