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",
|
||||
classNameBindings: [":color-example"],
|
||||
});
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
|
||||
export default Component.extend({
|
||||
tagName: "section",
|
||||
classNames: ["styleguide-example"],
|
||||
value: null,
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import Component from "@ember/component";
|
||||
import { afterRender } from "discourse-common/utils/decorators";
|
||||
import { later } from "@ember/runloop";
|
||||
|
||||
export default Ember.Component.extend({
|
||||
export default Component.extend({
|
||||
tagName: "section",
|
||||
classNames: ["styleguide-icons"],
|
||||
iconIds: [],
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
export default Ember.Component.extend({
|
||||
import Component from "@ember/component";
|
||||
|
||||
export default Component.extend({
|
||||
tagName: "",
|
||||
});
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import Component from "@ember/component";
|
||||
import { cookAsync } from "discourse/lib/text";
|
||||
|
||||
export default Ember.Component.extend({
|
||||
export default Component.extend({
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import Component from "@ember/component";
|
||||
import computed from "discourse-common/utils/decorators";
|
||||
|
||||
export default Ember.Component.extend({
|
||||
export default Component.extend({
|
||||
tagName: "section",
|
||||
classNameBindings: [":styleguide-section", "sectionClass"],
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
export default Ember.Controller.extend({
|
||||
import Controller from "@ember/controller";
|
||||
|
||||
export default Controller.extend({
|
||||
actions: {
|
||||
dummy() {},
|
||||
},
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
export default Ember.Controller.extend({
|
||||
import Controller from "@ember/controller";
|
||||
|
||||
export default Controller.extend({
|
||||
sections: null,
|
||||
});
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import Helper from "@ember/component/helper";
|
||||
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`);
|
||||
});
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import Route from "@ember/routing/route";
|
||||
import {
|
||||
findNote,
|
||||
sectionById,
|
||||
} from "discourse/plugins/styleguide/discourse/lib/styleguide";
|
||||
import { createData } from "discourse/plugins/styleguide/discourse/lib/dummy-data";
|
||||
|
||||
export default Ember.Route.extend({
|
||||
export default Route.extend({
|
||||
model(params) {
|
||||
return sectionById(params.section);
|
||||
},
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import Route from "@ember/routing/route";
|
||||
import { allCategories } from "discourse/plugins/styleguide/discourse/lib/styleguide";
|
||||
|
||||
export default Ember.Route.extend({
|
||||
export default Route.extend({
|
||||
model() {
|
||||
return allCategories();
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue