react-growl-notification
v1.0.1
Published
Simply display growl notifications for React project
Downloads
9
Readme
growl
Simply display growl notifications in React projects
Install
yarn add git+ssh://[email protected]/asiraky/growl.git
Usage
import React, { Component } from 'react'
import { Growl, useGrowl } from 'growl'
import 'growl/dist/index.css'
class Example extends Component {
render() {
const [growlActive, setGrowlActive] = useGrowl(3000)
return (
<div>
<button onClick={() => void setGrowlActive(true)}>Show Notification</button>
<Growl onDismissed={() => setGrowlActive(false)} active={growlActive} message="Hello World!" />
</div>
)
}
}
License
MIT © asiraky