- 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>`,
|
||||
duration: dismiss ? 3000 : 0,
|
||||
gravity: 'bottom',
|
||||
position: 'left'
|
||||
position: 'left',
|
||||
onClick: function(){
|
||||
if (toastObj) {
|
||||
toastObj.hideToast()
|
||||
}
|
||||
}
|
||||
}).showToast()
|
||||
if (id) {
|
||||
toastsWithId[id] = toastObj
|
||||
|
Loading…
Reference in New Issue
Block a user