mui-alert
v0.1.1
Published
The config `MUI-Snackbar` as Provider for convenience to show message alert in MaterialUI (error, info, success, warning)
Downloads
2
Readme
mui-alert
The config MUI-Snackbar
as Provider for convenience to show message alert in MaterialUI (error, info, success, warning)
Usage
<AlertProvider>
{children}
</AlertProvider>
Hooks
const alert = useAlert()
Show alert message
// success
alert.showAlert(AlertType.SUCCESS, "Something happened.")
// error
alert.showAlert(AlertType.ERROR, "Something went wrong.")
// info
alert.showAlert(AlertType.INFO, "Something happened.")
// warning
alert.showAlert(AlertType.WARNING, "Something happened.")