Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/js/show.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,11 @@ const createAction = (action, toastObject) => {
el.classList.add('ripple');

if (action.text) {
el.text = action.text
if (el.tagName === 'A') {
el.text = action.text
} else {
el.innerText = action.text;
}
}

if (action.href) {
Expand Down Expand Up @@ -370,6 +374,14 @@ const createAction = (action, toastObject) => {
})
}

break;
case 'callback':
let callback = (action.icon && action.icon instanceof Function) ? action.icon : null;

if(callback) {
iel = callback(iel);
}

break;
default:
iel.classList.add('material-icons');
Expand Down