0
0
Fork 0
salix-front-mindshore-fork2/src/composables/useNotify.js

23 lines
496 B
JavaScript

import { Notify } from 'quasar';
import { i18n } from 'src/boot/i18n';
export default function useNotify() {
const notify = (message, type, icon) => {
const defaultIcons = {
warning: 'warning',
negative: 'error',
positive: 'check',
};
Notify.create({
message: i18n.global.t(message),
type: type,
icon: icon ? icon : defaultIcons[type],
});
};
return {
notify,
};
}