This commit is contained in:
Mirco Wittrien 2020-03-03 19:44:40 +01:00
parent 0ec69abba4
commit 3449af26b3
2 changed files with 4 additions and 4 deletions

View File

@ -7718,13 +7718,13 @@
InternalComponents.LibraryComponents.SvgIcon = BDFDB.ReactUtils.getValue(window.BDFDB, "LibraryComponents.SvgIcon") || reactInitialized && class BDFDB_Icon extends LibraryModules.React.Component {
render() {
if (this.props.name && InternalComponents.LibraryComponents.SvgIcon.Names[this.props.name]) {
this.props.iconSVG = InternalComponents.LibraryComponents.SvgIcon.Names[this.props.name].icon;
if (BDFDB.ObjectUtils.is(this.props.name)) {
this.props.iconSVG = this.props.name.icon;
let props = Object.assign({
width: 24,
height: 24,
color: "currentColor"
}, InternalComponents.LibraryComponents.SvgIcon.Names[this.props.name].defaultProps, this.props);
}, this.props.name.defaultProps, this.props);
for (let key in props) this.props.iconSVG = this.props.iconSVG.replace(new RegExp(`%%${key}`, "g"), props[key]);
}
if (this.props.iconSVG) {

File diff suppressed because one or more lines are too long