Package Exports
- react-semantic-toasts
- react-semantic-toasts/styles/react-semantic-alert.css
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-semantic-toasts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React Semantic Toasts
Simple and easy Semantic UI toast notifications for React
Installation
$ npm install --save react-semantic-toasts
Usage
Import the library into your project using ES6 module syntax
import { SemanticToastContainer, toast } from 'react-semantic-toasts';
Render the SemanticToastContainer
component as high up the DOM as possible:
render() {
return <SemanticToastContainer />;
}
Fire as many notifications as you want
setTimeout(() => {
toast({
title: 'Semantic UI Info Toast',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
onClose: () => console.log('toast closed')
});
}, 2000);
setTimeout(() => {
toast({
type: 'warning',
icon: 'envelope',
title: 'Semantic UI Warning Toast',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit'
});
}, 5000);
License
Licensed under MIT