Before hook for onRun of Catalog entities (#3911)

Co-authored-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
chhandSebastian Malton authored and GitHub committed 2021-10-05 15:36:44 -04:00
1 parent 851274d314
commit 4af796c532
17 files changed
+636 -128

No files matched your search

+2 -2
View File
@@ -114,14 +114,14 @@ export class Icon extends React.PureComponent<IconProps> {
};
// render as inline svg-icon
if (svg) {
if (typeof svg === "string") {
const svgIconText = svg.includes("<svg") ? svg : require(`!!raw-loader!./${svg}.svg`).default;
iconContent = <span className="icon" dangerouslySetInnerHTML={{ __html: svgIconText }}/>;
}
// render as material-icon
if (material) {
if (typeof material === "string") {
iconContent = <span className="icon" data-icon-name={material}>{material}</span>;
}