mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
29 lines
654 B
JavaScript
29 lines
654 B
JavaScript
export const toasters = {
|
|
methods: {
|
|
toastSuccess(message) {
|
|
this.toast(message, {
|
|
title: this.$t('success'),
|
|
variant: 'success',
|
|
})
|
|
},
|
|
toastError(message) {
|
|
this.toast(message, {
|
|
title: this.$t('error.error'),
|
|
variant: 'danger',
|
|
})
|
|
},
|
|
toast(message, options) {
|
|
this.$bvToast.toast(message, {
|
|
autoHideDelay: 5000,
|
|
appendToast: false,
|
|
solid: true,
|
|
toaster: 'b-toaster-top-right',
|
|
headerClass: 'gdd-toaster-title',
|
|
bodyClass: 'gdd-toaster-body',
|
|
toastClass: 'gdd-toaster',
|
|
...options,
|
|
})
|
|
},
|
|
},
|
|
}
|