0.1.6 • Published 2 years ago
react-notification-base v0.1.6
React Notification Base
This is a simple react notification component to display notifications or hint texts You can check demo here
Prerequisites
This project requires NodeJs (Version 8 or later) and NPM. Node and NPM are really easy to install> To make sure you have them available on your machine, try running the following command.
$ npm -v && node -v 6.4.1 v8.16.0
Installation
npm install react-notification-base
Usage
import {Hint} from 'react-notification-base'
...
Usage in Code
import {Hint} from 'react-notification-base'
const myApp = () => {
...
<Hint/>
}
Default type is info and default variant is contained
Props
prop | value | description |
---|---|---|
type | 'success', 'error', 'warning', info. (Default is 'info') | The type of notification |
variant | 'contained','outlined' Default('contained') | This defines the notification variant |
dismissible | boolean (Default is true) | If set to false, it won't be dismissible and the cancel icon will be removed. |
isAnimated | boolean (Default is true) | The notificaton component is animated in and out |
label | string | The text that will be displayed on the component |