mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
15 lines
434 B
JavaScript
15 lines
434 B
JavaScript
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)}`,
|
|
|
|
@computed('field.type', 'field.id')
|
|
inputComponentName(type, id) {
|
|
return (type === 'component') ? Ember.String.dasherize(id) : `wizard-field-${type}`;
|
|
}
|
|
|
|
});
|