mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
DEV: Import set, setProperties, helper, and string functions (#8297)
This commit is contained in:

committed by
GitHub

parent
61b1f9c36b
commit
edc135d9c5
@ -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}`;
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user