Snackbar fix message color #204. CR: Juan

This commit is contained in:
Joan Sanchez 2018-05-24 09:19:23 +02:00
parent da45353777
commit e7f258061c
1 changed files with 6 additions and 1 deletions

View File

@ -22,6 +22,11 @@ export default class Controller extends Component {
* @param {Object} data The message data
*/
show(data) {
if (this.shown) {
this.hide();
this.onTransitionEnd();
}
this.clearTimeouts();
this.shown = true;
this.textNode.textContent = data.message;
@ -43,8 +48,8 @@ export default class Controller extends Component {
* @param {Object} data The message data
*/
showError(data) {
this.$snackbar.addClass('error');
this.show(data);
this.$snackbar.addClass('error');
}
/**