open-vault/ui/app/components/flash-message.js

16 lines
510 B
JavaScript
Raw Normal View History

import { getWithDefault, computed } from '@ember/object';
2018-04-03 14:16:57 +00:00
import FlashMessage from 'ember-cli-flash/components/flash-message';
export default FlashMessage.extend({
// override alertType to get Bulma specific prefix
//https://github.com/poteto/ember-cli-flash/blob/master/addon/components/flash-message.js#L35
alertType: computed('flash.type', {
get() {
const flashType = getWithDefault(this, 'flash.type', '');
2018-11-02 05:27:39 +00:00
let prefix = 'is-';
2018-04-03 14:16:57 +00:00
return `${prefix}${flashType}`;
},
}),
});