Skip to content

pavelivanov/react-notify-me

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

React component for notifications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published