checkpoint toast
This commit is contained in:
parent
16789717cf
commit
32b55cf9e4
|
|
@ -45,12 +45,14 @@ export const toast = {
|
||||||
) => {
|
) => {
|
||||||
clearTimeout(timer.timeout);
|
clearTimeout(timer.timeout);
|
||||||
timer.timeout = setTimeout(() => {
|
timer.timeout = setTimeout(() => {
|
||||||
sonner.success(el, {
|
toast.toasting.push(
|
||||||
...props,
|
sonner.success(el, {
|
||||||
onDismiss: (t) => {
|
...props,
|
||||||
toast.toasting = toast.toasting.filter((e) => e !== t.id);
|
onDismiss: (t) => {
|
||||||
},
|
toast.toasting = toast.toasting.filter((e) => e !== t.id);
|
||||||
});
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
timer.timeout = null;
|
timer.timeout = null;
|
||||||
}, timer.limit);
|
}, timer.limit);
|
||||||
},
|
},
|
||||||
|
|
@ -60,12 +62,14 @@ export const toast = {
|
||||||
) => {
|
) => {
|
||||||
clearTimeout(timer.timeout);
|
clearTimeout(timer.timeout);
|
||||||
timer.timeout = setTimeout(() => {
|
timer.timeout = setTimeout(() => {
|
||||||
sonner.error(el, {
|
toast.toasting.push(
|
||||||
...props,
|
sonner.error(el, {
|
||||||
onDismiss: (t) => {
|
...props,
|
||||||
toast.toasting = toast.toasting.filter((e) => e !== t.id);
|
onDismiss: (t) => {
|
||||||
},
|
toast.toasting = toast.toasting.filter((e) => e !== t.id);
|
||||||
});
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
clearTimeout(timer.timeout);
|
clearTimeout(timer.timeout);
|
||||||
|
|
||||||
timer.timeout = null;
|
timer.timeout = null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue