open-vault/ui/lib/core/addon/helpers/set-flash-message.js
Matthew Irish 0ccc8467ec
UI ember engines (#6718)
Adds replication engine and core in-repo addon
2019-05-13 14:05:25 -05:00

13 lines
284 B
JavaScript

import { inject as service } from '@ember/service';
import Helper from '@ember/component/helper';
export default Helper.extend({
flashMessages: service(),
compute([message, type]) {
return () => {
this.get('flashMessages')[type || 'success'](message);
};
},
});