Skip to content

Commit

Permalink
fixup! fixup! fixup! Feat(web-twig): Add autoclose feature to Toast c…
Browse files Browse the repository at this point in the history
…omponent
  • Loading branch information
pavelklibani committed May 18, 2024
1 parent b46e0e7 commit 384b3f1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions apps/web-twig-demo/assets/scripts/toast-dynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@ export const clearQueue = (event, containerId) => {
}
};

declare global {
interface Window {
addDynamicToast: (event: Event, containerId: string) => void;
clearQueue: (event: Event, containerId: string) => void;
}
}

// Make functions available in the global scope
(window as any).addDynamicToast = addDynamicToast;
(window as any).clearQueue = clearQueue;
window.addDynamicToast = addDynamicToast;
window.clearQueue = clearQueue;

export default addDynamicToast;

0 comments on commit 384b3f1

Please sign in to comment.