A simple (perhaps simplistic) toast notification script.
Transpiled Javascript and css are located in the dist
folder. Both are needed.
And to use:
let toast = Toast.Instance;
toast.notify(0, "This is an info message!");
For now, there are just two types of notification, 0 for info and 1 for warning. This is the first parameter to the notify()
method, the second parameter being the message.
Long messages will be cropped.
Typescript script as well as the companion css are in the src
folder.
- https://www.codingnepalweb.com for the side effect.