diff --git a/studio-frontend/src/app/icon.element.ts b/studio-frontend/src/app/icon.element.ts
index 949948c..5ed1409 100644
--- a/studio-frontend/src/app/icon.element.ts
+++ b/studio-frontend/src/app/icon.element.ts
@@ -1,5 +1,5 @@
import { match } from "@storyteller/utility";
-import { ElementPart, LitElement, html, nothing, unsafeCSS } from "lit";
+import { ElementPart, LitElement, TemplateResult, html, nothing, unsafeCSS } from "lit";
import { customElement, property } from "lit/decorators.js";
import { Directive, directive } from "lit/directive.js";
import { unsafeSVG } from "lit/directives/unsafe-svg.js";
@@ -24,24 +24,30 @@ export class IconElement extends LitElement {
- ${match (this.icon, {
- "circle-info": () => renderSvg(fasCircleInfo),
- "cube": () => renderSvg(fasCube),
- "globe": () => renderSvg(fasGlobe),
- "up-down-left-right": () => renderSvg(fasUpDownLeftRight),
- "rotate": () => renderSvg(fasRotate),
- "scale": () => renderSvg(fasScale),
- _: () => nothing,
- })}
+ ${renderSvg(this.icon)}
`;
}
-// TODO: Consider moving this
-function renderSvg(fullSvg: string) {
- console.log("parsing:", fullSvg);
+const RENDER_RESULTS = new Map();
- const [, attrsString, body] = fullSvg.match(/