0.1.13 • Published 2 years ago

react-snackbar-popup v0.1.13

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

React Snackbar

React { Snackbar } is a package for showing messages or popups.

Installation

Use the package manager yarn or NPM to install React Snackbar.

yarn install react-snackbar-popup

Usage

import Snackbar from 'react-snackbar-popup'

const [showSnackbar, setShowSnackbar] = useState(false);

const handleSnackbar = () => {
    setShowSnackbar(false)
}

<Snackbar
    message={"Hello World"}
    type={'success'}
    duration={5000}
    closeAlert={e => handleSnackbar(e)}
    open={showSnackbar}
/>

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT