RC-105 | Add an rc-svg component for ease of SVG-loading, and add the hero silhouette to the sheet

This commit is contained in:
Oliver-Akins 2025-01-15 21:02:17 -07:00
parent c1f0e8d9c5
commit 07f3b24897
9 changed files with 63 additions and 4 deletions

View file

@ -123,4 +123,4 @@ export class RipCryptIcon extends StyledShadowElement(HTMLElement) {
temp.innerHTML = content;
return temp.querySelector(`svg`);
};
};
};

View file

@ -1,8 +1,10 @@
import { Logger } from "../../utils/Logger.mjs";
import { RipCryptIcon } from "./Icon.mjs";
import { RipCryptSVGLoader } from "./svgLoader.mjs";
const components = [
RipCryptIcon,
RipCryptSVGLoader,
];
export function registerCustomComponents() {

View file

@ -69,4 +69,4 @@ export function StyledShadowElement(Base) {
}
};
};
};
};

View file

@ -0,0 +1,11 @@
import { RipCryptIcon } from "./Icon.mjs";
/**
Attributes:
@property {string} name - The name of the icon, takes precedence over the path
@property {string} path - The path of the icon file
*/
export class RipCryptSVGLoader extends RipCryptIcon {
static elementName = `rc-svg`;
static _stylePath = `css/components/svg-loader.css`;
};