svelte-toastify
v0.0.27
Published
> Under development *DO NOT USE*
Downloads
236
Readme
Svelte Toastify
Under development DO NOT USE
Toast Library for svelte
Setup
Import toast and ToastContainer component
import { toast, ToastContainer } from "svelte-toastify";
Configure
toast.configure({
position: "top-right"
});
Add toast container in App.svelte
<main>
<div>Your App </div>
<ToastContainer />
</main>
Usage
Import toast in you component
import { toast } from "svelte-toastify";
To Fire a toast
toast.success("This is a success message");
toast.error("This is an error message");
toast.info("This is an info message");
toast.warn("This is an warning message");