FIX: Add REPLACEMENTS icons to styleguide

This commit is contained in:
Jordan Vidrine 2022-12-15 09:12:18 -06:00 committed by GitHub
parent 644237b395
commit ef62c85a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -11,7 +11,7 @@ let _renderers = [];
let warnMissingIcons = true;
let _iconList;
const REPLACEMENTS = {
export const REPLACEMENTS = {
"d-tracking": "bell",
"d-muted": "discourse-bell-slash",
"d-regular": "far-bell",

View File

@ -1,5 +1,6 @@
import Component from "@ember/component";
import { afterRender } from "discourse-common/utils/decorators";
import { REPLACEMENTS } from "discourse-common/lib/icon-library";
import discourseLater from "discourse-common/lib/later";
export default Component.extend({
@ -17,6 +18,7 @@ export default Component.extend({
let symbols = document.querySelectorAll("#svg-sprites symbol");
if (symbols.length > 0) {
let ids = Array.from(symbols).mapBy("id");
ids.push(...Object.keys(REPLACEMENTS));
this.set("iconIds", ids.sort());
} else {
// Let's try again a short time later if there are no svgs loaded yet

View File

@ -183,6 +183,7 @@
}
span {
font-size: var(--font-down-1);
word-wrap: break-word;
}
}
}