Skip to content

Commit b9b9d43

Browse files
committed
Handle pointer-events better
1 parent 3ab06b5 commit b9b9d43

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/SvelteToast.svelte

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@ const getCss = theme => Object.keys(theme).reduce((a, c) => `${a}${c}:${theme[c]
2323

2424
<style>
2525
ul {
26+
top: var(--toastContainerTop,1.5rem);
27+
right: var(--toastContainerRight,2rem);
28+
bottom: var(--toastContainerBottom,auto);
29+
left: var(--toastContainerLeft,auto);
2630
position: fixed;
2731
margin: 0;
2832
padding: 0;
2933
list-style-type: none;
34+
pointer-events: none;
3035
z-index: 9999;
31-
top: var(--toastContainerTop,1.5rem);
32-
right: var(--toastContainerRight,2rem);
33-
bottom: var(--toastContainerBottom,auto);
34-
left: var(--toastContainerLeft,auto);
3536
}
3637
</style>
3738

src/ToastItem.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ $: if (prevProgress !== item.progress) {
4040
padding: var(--toastMsgPadding,0.75rem 0.5rem);
4141
flex: 1 1 0%;
4242
}
43+
._toastMsg :global(a) {
44+
pointer-events: auto;
45+
}
4346
._toastBtn {
4447
width: 2rem;
4548
height: 100%;

0 commit comments

Comments
 (0)