Add timeout customizatoin for notification toast
This commit is contained in:
@@ -13,7 +13,11 @@
|
|||||||
type: event.detail.type,
|
type: event.detail.type,
|
||||||
};
|
};
|
||||||
|
|
||||||
setTimeout(() => toast = null, 4000);
|
const delay = event.detail.timeout ?? 4000;
|
||||||
|
|
||||||
|
if (delay > 0) {
|
||||||
|
setTimeout(() => toast = null, delay);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
"
|
"
|
||||||
class="toast {{ $position }} z-50"
|
class="toast {{ $position }} z-50"
|
||||||
|
|||||||
Reference in New Issue
Block a user