This plugin is only useful for developers, however, making it core allows us to centralize any component modification in one commit. This integration also adds a new site_setting: `styleguide_admin_only` which allows to enable a styleguide on a live site while restricting visibility to admins only. By default, styleguide is disabled.
22 lines
405 B
JavaScript
22 lines
405 B
JavaScript
import { later } from "@ember/runloop";
|
|
|
|
export default Ember.Component.extend({
|
|
tagName: "section",
|
|
classNames: ["styleguide-icons"],
|
|
iconIDs: [],
|
|
|
|
didInsertElement() {
|
|
this._super(...arguments);
|
|
|
|
later(() => {
|
|
let IDs = $("#svg-sprites symbol")
|
|
.map(function () {
|
|
return this.id;
|
|
})
|
|
.get();
|
|
|
|
this.set("iconIDs", IDs);
|
|
}, 2000);
|
|
},
|
|
});
|