There should be a simple API for storing alert templates. E.g., we may always want to use the same alert over and over with a different (optional) title/type/message. It should be possible to do something like:
Bert.templates = {
error(message, type, title) {
return { message, type: 'growl-top-right', title, style: 'danger', icon: 'fa-remove' };
},
};
// In the app
Bert.error('Something went wrong'); // No need to do Bert.alert('Something went wrong', 'danger');
There should be a simple API for storing alert templates. E.g., we may always want to use the same alert over and over with a different (optional) title/type/message. It should be possible to do something like: