1.0.14 • Published 1 year ago

wsm-toast v1.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Webstudio Toast Module

This module adds alerts and notification capabilities to web apps built with Webstudio

Webstudio Module Toast

Testing and Building Module

npm i
npm run test
npm run build

Publish to NPMJS

npm publish

Importing Dependency in Webstudio

Add it to the project, this is compatible with grapesjs as well.

npm i --save wsm-toast@latest

To import in the editor add the file and include it as a Plugin

import PluginToast from "wsm-toast"

const editor = grapesjs.init({
    container: "#gjs",
    plugins: [
        PluginToast
    ],
})

Dispatch Toast Event From Other Modules In Webstudio

const event = new CustomEvent('onToast', { 
    detail: { 
        alertSeverity: "info", // info, success or error
        message: 'Message to display in toast', 
        link: 'https://google.com', // Optional link
        timeout: 5000 // Milliseconds of visibility
    }
})
 document.dispatchEvent(event)
1.0.14

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago