1.0.1 • Published 4 years ago

react-growl-notification v1.0.1

Weekly downloads
30
License
MIT
Repository
github
Last release
4 years ago

growl

Simply display growl notifications in React projects

JavaScript Style Guide

Install

yarn add git+ssh://git@github.com/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