1.1.1 • Published 7 months ago

@croz/nrich-notification-mui v1.1.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 months ago

@croz/nrich-notification-mui

Overview

@croz/nrich-notification-mui is a MUI wrapper for the @croz/nrich-notification-core module. For the display of the notifications a Snackbar and Alert are used.

Setup

To use this module in your project run npm install @croz/nrich-notification-mui or yarn add @croz/nrich-notification-mui

Usage

  1. Add Notifications component on a part of your app, usually on App or some other higher level component.
import { Notifications } from "@croz/nrich-notification-mui";

const App = () => {
  return (
    <div>
      <Notifications autoClose={3000} position="top-right"/>
      {/* other components... */}
    </div>
  )
}

Available props for the Notifications component are:

Prop nameDescriptionPossible valuesDefault value
autoCloseThe duration after which the notification closes expressed in milliseconds. If left undefined, it doesn't close.number in milliseconds, or undefinedundefined
positionSpecifies the notification position on the page, derived from a set of predefined positions available in MUItop-left, top-center, top-right, bottom-left, bottom-center, bottom-rightbottom-right