Some fixes

This commit is contained in:
2017-07-21 12:55:36 +02:00
parent f30056363b
commit 1cf023e476
4 changed files with 25 additions and 11 deletions

View File

@ -26,12 +26,19 @@ export class StatusMessage {
})
}
clearStyle() {
this.container.classList.remove("info-message")
this.container.classList.remove("error-message")
}
showError(message: string, duration?: number) {
this.clearStyle()
this.show(message, duration || 4000)
this.container.classList.add("error-message")
}
showInfo(message: string, duration?: number) {
this.clearStyle()
this.show(message, duration || 2000)
this.container.classList.add("info-message")
}