<file_sep>import React from 'react'

import { useGrowl, Growl } from 'growl-react-component'
import './index.css'
import 'growl-react-component/dist/index.css'

function App() {
  const [active, setActive] = useGrowl()

  return (
    <div className="app">
      <header className="">
        <a className="App-link" href="#" onClick={() => {
          void setActive(true)
        }}>
          Click here to activate the growl
        </a>
      </header>
      <Growl onDismissed={() => setActive(false)} active={active} timer={5000} message="Hello World!"/>
    </div>
  )
}

export default App
<file_sep># growl-react-component

> Growl React Component

[![NPM](https://img.shields.io/npm/v/growl-react-component.svg)](https://www.npmjs.com/package/growl-react-component) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save growl-react-component
```

## Usage

```jsx
import React, { Component } from 'react'

import {Growl, useGrowl} from 'growl-react-component'

class Example extends Component {
 const [active, setActive] = useGrowl()

  render() {
    return 
        (
        <Growl 
                onDismissed={() => setActive(false)} 
                active={active}
                timer={5000} 
                message="Hello World!"
            />
        )
  }
}
```

## License

MIT © [PRADHAN-P](https://github.com/PRADHAN-P)
