DEV: Import set, setProperties, helper, and string functions (#8297)

This commit is contained in:
Mark VanLandingham
2019-11-05 12:43:49 -06:00
committed by GitHub
parent 61b1f9c36b
commit edc135d9c5
31 changed files with 103 additions and 51 deletions

View File

@ -1,19 +1,20 @@
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
import { dasherize } from "@ember/string";
export default Component.extend({
classNameBindings: [":wizard-field", "typeClass", "field.invalid"],
@computed("field.type")
typeClass: type => `${Ember.String.dasherize(type)}-field`,
typeClass: type => `${dasherize(type)}-field`,
@computed("field.id")
fieldClass: id => `field-${Ember.String.dasherize(id)} wizard-focusable`,
fieldClass: id => `field-${dasherize(id)} wizard-focusable`,
@computed("field.type", "field.id")
inputComponentName(type, id) {
return type === "component"
? Ember.String.dasherize(id)
? dasherize(id)
: `wizard-field-${type}`;
}
});