toast-notifications
v1.0.7
Published
Made with create-react-library
Downloads
13
Readme
notification
Made with create-react-library
Install
npm install --save toast-notifications
Usage
import React, { Component } from 'react'
import { Notification , NotificationWrapper} from 'notification'
import 'notification/dist/index.css'
class Example extends Component {
const createNotification=(title, info, duration, type)=>{
Notification(title, info, duration, type)
}
render(){
<div>
<button className="btn btn-info" onClick={() => createNotification('título','mensaje', 300000000, 'success')}>SUCCESS</button>
<button className="btn btn-info" onClick={() => createNotification('título', 'info', 3000, 'danger')}>DANGER</button>
<NotificationWrapper/>
</div>
}
}
License
MIT © [Valentina Olivares](https://github.com/Valentina Olivares)