Package Exports
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 (mui-simple-toast) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
mui-simple-toast - Simplified toaster/snackbar for MUI
A Simpler MUI Toast.
How to use?
import { MUISimpleToast, ToastContext } from 'mui-simple-toast'- In your component,
const { setToast } = useContext(ToastContext)and Set toaster using seToast
Example on API Call:
fetch(url)
.then(() => setToast({
show: true,
type: 'success',
message: 'Success!',
}))
.catch(err => setToast({
show: true,
type: 'error',
message: err?.message || '',
}))
In return method of component, add <MUISimpleToast />