hedera-web/src/composables/useNotify.js

23 lines
481 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,
icon: icon || defaultIcons[type]
});
};
return {
notify
};
}