1.0.0 • Published 4 years ago

ikpeba-react-toast v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

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