0.0.6 • Published 12 months ago
@ppxp/swals v0.0.6
Swals
Usage
Externally importing into browser
const {
Input,
Toast,
ToastUndo
} = swals;
const val = (await Input.fire("What's your name?", "How are you doing?")).value;
await ToastUndo.fire({
title: "Hello " + val + "!",
text: "You have been greeted.",
preDeny: () => {
Toast.fire("As you wish", "You are no longer greeted.", "success");
}
});
Importing using Node
import { Toast, NumberInput } from "@ppxp/swals";
NumberInput.fire("How old are you?", "What is your age?").then(async res => {
await Toast.fire("You are " + res.value + " years old", "", "info")
});
0.0.6
12 months ago