DEV: Use Ember imports in the styleguide code (#16123)
This commit is contained in:
parent
c528de3288
commit
6e7cdc5bc3
|
@ -1,4 +1,6 @@
|
||||||
export default Ember.Component.extend({
|
import Component from "@ember/component";
|
||||||
|
|
||||||
|
export default Component.extend({
|
||||||
tagName: "section",
|
tagName: "section",
|
||||||
classNameBindings: [":color-example"],
|
classNameBindings: [":color-example"],
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
export default Ember.Component.extend({
|
import Component from "@ember/component";
|
||||||
|
|
||||||
|
export default Component.extend({
|
||||||
tagName: "section",
|
tagName: "section",
|
||||||
classNames: ["styleguide-example"],
|
classNames: ["styleguide-example"],
|
||||||
value: null,
|
value: null,
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
|
import Component from "@ember/component";
|
||||||
import { afterRender } from "discourse-common/utils/decorators";
|
import { afterRender } from "discourse-common/utils/decorators";
|
||||||
import { later } from "@ember/runloop";
|
import { later } from "@ember/runloop";
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
export default Component.extend({
|
||||||
tagName: "section",
|
tagName: "section",
|
||||||
classNames: ["styleguide-icons"],
|
classNames: ["styleguide-icons"],
|
||||||
iconIds: [],
|
iconIds: [],
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
export default Ember.Component.extend({
|
import Component from "@ember/component";
|
||||||
|
|
||||||
|
export default Component.extend({
|
||||||
tagName: "",
|
tagName: "",
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
import Component from "@ember/component";
|
||||||
import { cookAsync } from "discourse/lib/text";
|
import { cookAsync } from "discourse/lib/text";
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
export default Component.extend({
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
import Component from "@ember/component";
|
||||||
import computed from "discourse-common/utils/decorators";
|
import computed from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
export default Component.extend({
|
||||||
tagName: "section",
|
tagName: "section",
|
||||||
classNameBindings: [":styleguide-section", "sectionClass"],
|
classNameBindings: [":styleguide-section", "sectionClass"],
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
export default Ember.Controller.extend({
|
import Controller from "@ember/controller";
|
||||||
|
|
||||||
|
export default Controller.extend({
|
||||||
actions: {
|
actions: {
|
||||||
dummy() {},
|
dummy() {},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
export default Ember.Controller.extend({
|
import Controller from "@ember/controller";
|
||||||
|
|
||||||
|
export default Controller.extend({
|
||||||
sections: null,
|
sections: null,
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
import Helper from "@ember/component/helper";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
||||||
export default Ember.Helper.helper(function (params) {
|
export default Helper.helper(function (params) {
|
||||||
return I18n.t(`styleguide.sections.${params[0].replace(/\-/g, "_")}.title`);
|
return I18n.t(`styleguide.sections.${params[0].replace(/\-/g, "_")}.title`);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
|
import Route from "@ember/routing/route";
|
||||||
import {
|
import {
|
||||||
findNote,
|
findNote,
|
||||||
sectionById,
|
sectionById,
|
||||||
} from "discourse/plugins/styleguide/discourse/lib/styleguide";
|
} from "discourse/plugins/styleguide/discourse/lib/styleguide";
|
||||||
import { createData } from "discourse/plugins/styleguide/discourse/lib/dummy-data";
|
import { createData } from "discourse/plugins/styleguide/discourse/lib/dummy-data";
|
||||||
|
|
||||||
export default Ember.Route.extend({
|
export default Route.extend({
|
||||||
model(params) {
|
model(params) {
|
||||||
return sectionById(params.section);
|
return sectionById(params.section);
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
import Route from "@ember/routing/route";
|
||||||
import { allCategories } from "discourse/plugins/styleguide/discourse/lib/styleguide";
|
import { allCategories } from "discourse/plugins/styleguide/discourse/lib/styleguide";
|
||||||
|
|
||||||
export default Ember.Route.extend({
|
export default Route.extend({
|
||||||
model() {
|
model() {
|
||||||
return allCategories();
|
return allCategories();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue