Skip to content

Instantly share code, notes, and snippets.

@ilyasakin
Created July 4, 2022 23:45
Show Gist options
  • Save ilyasakin/060c0d1e9b6c6f8d1b942f60e50e3760 to your computer and use it in GitHub Desktop.
Save ilyasakin/060c0d1e9b6c6f8d1b942f60e50e3760 to your computer and use it in GitHub Desktop.
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