1.0.9 • Published 7 years ago

react-beautiful-notify v1.0.9

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

react-beautiful-notify

React-Beautiful-Notify is a custom React notify/toast component.

Installation

npm install react-beautiful-notify

Demo

https://kdipaolo.github.io/notify/

Usage

import Location, { notify } from 'react-beautiful-notify'

class App extends React.Component {
  handleClick = () => {
    const options = {
      type: 'confirmation'
    }
    notify.show('Are you sure?', options)
  }
  render() {
    return (
      <div>
        <Location />
        <h1>React Beautiful Notify</h1>
        <button onClick={this.handleClick}>Click!</button>
      </div>
    )
  }
}

Options

NameTypeDefaultDescription
type              string  success       can be success, warning, error, confirmation
timeout            number  5000       How long the notification should show for
mainColorstring'#333'Text/Button Color
animationDuration  number  300              Duration of animation
background      string  '#fff'      Background Color                          
wrapperId      string  'notification-wrapper'Mounting ID for React Dom                  

License

MIT

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago