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:
parent
c1f0e8d9c5
commit
07f3b24897
9 changed files with 63 additions and 4 deletions
|
|
@ -123,4 +123,4 @@ export class RipCryptIcon extends StyledShadowElement(HTMLElement) {
|
|||
temp.innerHTML = content;
|
||||
return temp.querySelector(`svg`);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -69,4 +69,4 @@ export function StyledShadowElement(Base) {
|
|||
}
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
11
module/Apps/elements/svgLoader.mjs
Normal file
11
module/Apps/elements/svgLoader.mjs
Normal 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`;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue