react-notify-me

0.5.5 • Public • Published

React notification

Npm Version Month Downloads Npm Licence

NPM

Overview

Example

Install

npm install --save react-notify-me

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.5.50latest

Version History

VersionDownloads (Last 7 Days)Published
0.5.50
0.5.40
0.5.30
0.5.20
0.5.10
0.5.00
0.4.40
0.4.30
0.4.21
0.4.10
0.4.00
0.3.10
0.3.00
0.2.00
0.1.00

Package Sidebar

Install

npm i react-notify-me

Weekly Downloads

1

Version

0.5.5

License

MIT

Last publish

Collaborators

  • grammka