Enhance toast to grilled cheese toast!

This commit is contained in:
Stephan Porada 2020-01-17 15:10:01 +01:00
parent 9ee2e9bdbd
commit e5928731ec

View File

@ -11,12 +11,13 @@ var foreignJobs;
var foreignJobsSubscribers = [];
function toast(message) {
function toast(message, color="") {
var toast;
var toastActionElement;
toast = M.toast({"html": `<span>${message}</span>
<button class="btn-flat toast-action red-text" data-action="close">
toast = M.toast({"classes": color,
"html": `<span>${message}</span>
<button class="btn-flat toast-action white-text" data-action="close">
<i class="material-icons">close</i>
</button>`});
toastActionElement = toast.el.querySelector(`.toast-action[data-action="close"]`);