- hide toast on click
This commit is contained in:
parent
65b2619327
commit
efa5decadf
File diff suppressed because one or more lines are too long
@ -31,7 +31,12 @@ export const toast = function(msg, icon = null, dismiss = true, id = null) {
|
|||||||
text: `<span class="toast-icon">${icon}</span><span class="toast-message">${msg}</toast>`,
|
text: `<span class="toast-icon">${icon}</span><span class="toast-message">${msg}</toast>`,
|
||||||
duration: dismiss ? 3000 : 0,
|
duration: dismiss ? 3000 : 0,
|
||||||
gravity: 'bottom',
|
gravity: 'bottom',
|
||||||
position: 'left'
|
position: 'left',
|
||||||
|
onClick: function(){
|
||||||
|
if (toastObj) {
|
||||||
|
toastObj.hideToast()
|
||||||
|
}
|
||||||
|
}
|
||||||
}).showToast()
|
}).showToast()
|
||||||
if (id) {
|
if (id) {
|
||||||
toastsWithId[id] = toastObj
|
toastsWithId[id] = toastObj
|
||||||
|
Loading…
Reference in New Issue
Block a user