messagesStore

Different from messageAction, messagesStore allow you to show message anytime you want.

Demo

Usage

<script>
import { messagesStore } from "svelte-legos";

function handleClick() {
  messagesStore("Here is your message");

  // or send type as "success" | "warning" | "error" | "info" (default)

  messagesStore("Here is your message", "success");
}
</script>

<button
  on:click={handleClick}
>
  Show Message
</button>