diff --git a/.gitignore b/.gitignore index 3b0a0c6..2add9d5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ demo/platforms demo/node_modules node_modules .vscode -.ideas +.idea .DS_Store diff --git a/demo/app/main-page.ts b/demo/app/main-page.ts index ce6fbc5..6058324 100644 --- a/demo/app/main-page.ts +++ b/demo/app/main-page.ts @@ -24,3 +24,11 @@ export function positionToast() { toast.duration = ToastDuration.SHORT; toast.show(); } + +export function cancelToast() { + const toast = new Toasty('Canceling after 1 sec'); + toast.show(); + setTimeout(() => { + toast.cancel(); + }, 1000); +} diff --git a/demo/app/main-page.xml b/demo/app/main-page.xml index 080983d..05c3eb8 100644 --- a/demo/app/main-page.xml +++ b/demo/app/main-page.xml @@ -12,6 +12,9 @@