mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Add REPLACEMENTS icons to styleguide
This commit is contained in:
parent
644237b395
commit
ef62c85a12
@ -11,7 +11,7 @@ let _renderers = [];
|
|||||||
let warnMissingIcons = true;
|
let warnMissingIcons = true;
|
||||||
let _iconList;
|
let _iconList;
|
||||||
|
|
||||||
const REPLACEMENTS = {
|
export const REPLACEMENTS = {
|
||||||
"d-tracking": "bell",
|
"d-tracking": "bell",
|
||||||
"d-muted": "discourse-bell-slash",
|
"d-muted": "discourse-bell-slash",
|
||||||
"d-regular": "far-bell",
|
"d-regular": "far-bell",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { afterRender } from "discourse-common/utils/decorators";
|
import { afterRender } from "discourse-common/utils/decorators";
|
||||||
|
import { REPLACEMENTS } from "discourse-common/lib/icon-library";
|
||||||
import discourseLater from "discourse-common/lib/later";
|
import discourseLater from "discourse-common/lib/later";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
@ -17,6 +18,7 @@ export default Component.extend({
|
|||||||
let symbols = document.querySelectorAll("#svg-sprites symbol");
|
let symbols = document.querySelectorAll("#svg-sprites symbol");
|
||||||
if (symbols.length > 0) {
|
if (symbols.length > 0) {
|
||||||
let ids = Array.from(symbols).mapBy("id");
|
let ids = Array.from(symbols).mapBy("id");
|
||||||
|
ids.push(...Object.keys(REPLACEMENTS));
|
||||||
this.set("iconIds", ids.sort());
|
this.set("iconIds", ids.sort());
|
||||||
} else {
|
} else {
|
||||||
// Let's try again a short time later if there are no svgs loaded yet
|
// Let's try again a short time later if there are no svgs loaded yet
|
||||||
|
@ -183,6 +183,7 @@
|
|||||||
}
|
}
|
||||||
span {
|
span {
|
||||||
font-size: var(--font-down-1);
|
font-size: var(--font-down-1);
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user