Skip to content

Commit

Permalink
Handle pointer-events better
Browse files Browse the repository at this point in the history
  • Loading branch information
zerodevx committed Apr 7, 2021
1 parent 3ab06b5 commit b9b9d43
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/SvelteToast.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ const getCss = theme => Object.keys(theme).reduce((a, c) => `${a}${c}:${theme[c]

<style>
ul {
top: var(--toastContainerTop,1.5rem);
right: var(--toastContainerRight,2rem);
bottom: var(--toastContainerBottom,auto);
left: var(--toastContainerLeft,auto);
position: fixed;
margin: 0;
padding: 0;
list-style-type: none;
pointer-events: none;
z-index: 9999;
top: var(--toastContainerTop,1.5rem);
right: var(--toastContainerRight,2rem);
bottom: var(--toastContainerBottom,auto);
left: var(--toastContainerLeft,auto);
}
</style>

Expand Down
3 changes: 3 additions & 0 deletions src/ToastItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ $: if (prevProgress !== item.progress) {
padding: var(--toastMsgPadding,0.75rem 0.5rem);
flex: 1 1 0%;
}
._toastMsg :global(a) {
pointer-events: auto;
}
._toastBtn {
width: 2rem;
height: 100%;
Expand Down

0 comments on commit b9b9d43

Please sign in to comment.