NanoToast

Usage in React

All the features of NanoToast are available in React too!

Installation

Using npm
npm install @iamsabbir/nanotoast

Using Yarn
yarn add @iamsabbir/nanotoast

Render a toast

import toast from "@iamsabbir/nanotoast";
import "@iamsabbir/nanotoast/src/styles.css"; // Ensure you import styles

const App = () => {
  return <button onClick={() => toast.success("React is awesome!")}>Show Toast</button>;
};

More toast types

toast.success("React is awesome!");
toast.error("React is not awesome!");
toast.warning("React is okay!");
toast.info("React is great!");