discourse/app/assets/javascripts/wizard/components/wizard-field.js.es6

15 lines
434 B
Text
Raw Normal View History

2016-08-25 13:14:56 -04:00
import computed from 'ember-addons/ember-computed-decorators';
export default Ember.Component.extend({
classNameBindings: [':wizard-field', ':text-field', 'field.invalid'],
@computed('field.id')
inputClassName: id => `field-${Ember.String.dasherize(id)}`,
2016-09-02 11:42:14 -04:00
@computed('field.type', 'field.id')
inputComponentName(type, id) {
return (type === 'component') ? Ember.String.dasherize(id) : `wizard-field-${type}`;
}
2016-08-25 13:14:56 -04:00
});