mui-alert
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

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.")

Readme

Keywords

none

Package Sidebar

Install

npm i mui-alert

Weekly Downloads

3

Version

0.1.1

License

MIT

Unpacked Size

21 kB

Total Files

12

Last publish

Collaborators

  • cuonghx.gu-tech