open-vault/ui/app/components/alert-banner.js

21 lines
484 B
JavaScript
Raw Normal View History

import Component from '@ember/component';
import { computed } from '@ember/object';
2018-04-03 14:16:57 +00:00
import { messageTypes } from 'vault/helpers/message-types';
export default Component.extend({
2018-04-03 14:16:57 +00:00
type: null,
yieldWithoutColumn: false,
2018-04-03 14:16:57 +00:00
classNameBindings: ['containerClass'],
containerClass: computed('type', function() {
return 'message ' + messageTypes([this.get('type')]).class;
}),
alertType: computed('type', function() {
return messageTypes([this.get('type')]);
}),
});