mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -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 _iconList;
|
||||
|
||||
const REPLACEMENTS = {
|
||||
export const REPLACEMENTS = {
|
||||
"d-tracking": "bell",
|
||||
"d-muted": "discourse-bell-slash",
|
||||
"d-regular": "far-bell",
|
||||
|
@ -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
|
||||
|
@ -183,6 +183,7 @@
|
||||
}
|
||||
span {
|
||||
font-size: var(--font-down-1);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user