Skip to content
React component for notifications
JavaScript CSS HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
images
src
.babelrc
.gitignore
.npmignore
LICENSE.txt
README.md
package.json

README.md

React notification

React component for notifications

Npm Version Month Downloads Npm Licence

Install

npm install --save react-notify-me

Overview

Example

Usage

import { Notifications } from 'react-notify-me'

render() {
  return (
    <div role="wrapper">
      {this.props.children}
      <Notifications config={{ autoDismiss: 4000, position: 'bottomRight' }} />
    </div>
  )
}
import notify from 'react-notify-me'

componentDidMount() {
  notify({
    content: 'Component has beeen mounted',
  })
}

Props

Notifications component:
name type default description
autoDismiss Boolean or Number false Timeout for dismiss notification
position String 'topRight' Playcment. Options: 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'
notify method:
name type default description
content String or React Component
contentType String 'text' Type of Content for render method. Options: 'text', 'html', 'component'. By default uses 'text' type, also 'component' type makes same as 'text' type.

##Example

To run example download repository, install dependencies and make npm run npu

You can’t perform that action at this time.