33 lines
823 B
JavaScript
33 lines
823 B
JavaScript
// Generated by CoffeeScript 1.12.5
|
|
import Ember from 'ember';
|
|
|
|
export default Ember.Component.extend({
|
|
tagName: 'span',
|
|
type: null,
|
|
classNames: ['value-type-display'],
|
|
classNameBindings: ['typeClass'],
|
|
typeClass: Ember.computed('type', function() {
|
|
return this.get('type') || 'no-typ';
|
|
}),
|
|
iconClass: Ember.computed('type', function() {
|
|
switch (this.get('type')) {
|
|
case 'boolean':
|
|
return 'check square outline';
|
|
case 'date':
|
|
return 'calendar alternate outline';
|
|
case 'select':
|
|
return 'list';
|
|
case 'string':
|
|
return 'terminal';
|
|
case 'text':
|
|
return 'sticky note outline';
|
|
case 'number':
|
|
return 'hashtag';
|
|
case 'timestamp':
|
|
return 'wait';
|
|
default:
|
|
return 'red warning circle';
|
|
}
|
|
})
|
|
});
|