1.0.0 • Published 4 years ago
ikpeba-react-toast v1.0.0
A simple React Toast
A simple and light weight react toast
How to use
Clone app
Import toastProvider and wrap around app
Example
import withToastProvider from "./Toast/withToastProvider";
let ToastProvider = withToastProvider(App);
ReactDOM.render( , document.getElementById("root") );
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