Created
July 4, 2022 23:45
-
-
Save ilyasakin/060c0d1e9b6c6f8d1b942f60e50e3760 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Notify } from 'quasar'; | |
export default class NotificationService { | |
private readonly notify: Notify = Notify; | |
constructor() { | |
this.notify.setDefaults({ | |
position: 'top-right', | |
textColor: 'white', | |
}); | |
} | |
public showError(message: string): void { | |
this.notify.create({ | |
message, | |
color: 'negative', | |
}); | |
} | |
public showSuccess(message: string): void { | |
this.notify.create({ | |
message, | |
color: 'positive', | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment