diff --git a/src/lib/ToastItem.svelte b/src/lib/ToastItem.svelte index 158578b..907fe22 100644 --- a/src/lib/ToastItem.svelte +++ b/src/lib/ToastItem.svelte @@ -89,6 +89,7 @@ onDestroy(() => { on:mouseenter={() => { if (item.pausable) pause() }} + on:click={item.onclick} on:mouseleave={resume} >
diff --git a/src/lib/stores.js b/src/lib/stores.js index 8bce7fa..b065863 100644 --- a/src/lib/stores.js +++ b/src/lib/stores.js @@ -35,6 +35,7 @@ import { writable } from 'svelte/store' * @property {Object} [theme] - css var overrides * @property {string[]} [classes] - user-defined classes * @property {SvelteToastOnPopCallback} [onpop] - callback that runs on toast dismiss + * @property {SvelteToastOnPopCallback} [onclick] - callback that runs on toast dismiss * @property {SvelteToastCustomComponent} [component] - send custom Svelte Component as a message * @property {number} [progress] - DEPRECATED */