@ppxp/swals

0.0.6 • Public • Published

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")
});

Package Sidebar

Install

npm i @ppxp/swals

Weekly Downloads

1

Version

0.0.6

License

MIT

Unpacked Size

5.41 kB

Total Files

12

Last publish

Collaborators

  • gemsvido