ikpeba-react-toast

1.0.0 • Public • Published

A simple React Toast

A simple and light weight react toast

How to use

  1. Clone app

  2. Import toastProvider and wrap around app

    Example

    import withToastProvider from "./Toast/withToastProvider";

    let ToastProvider = withToastProvider(App);

    ReactDOM.render( , document.getElementById("root") );

  3. Import Toast using UseToast Hook

    Example

    import { useToast } from "./Toast";

    const toast = useToast();

    toast.success("I am awesome");

    You can pass a string array to the add method

    toast.error(["I am awesome", "That's true"]);

    Methods

    Available methods are

    info, success, warning, error

Credit

https://github.com/henev/react-custom-toast

Readme

Keywords

none

Package Sidebar

Install

npm i ikpeba-react-toast

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

40.1 kB

Total Files

28

Last publish

Collaborators

  • ikpeba4ll