client/public/elements/components/icon.js
/**
   * @method renderIcon
   * @description renders the icon depending on if it is
   * and iron icon or a custom icon as an html
   * @returns {HTML} 
   */
@method renderIcon
@description renders the icon depending on if it is
and iron icon or a custom icon as an html
@returns {HTML}
@method renderIcon @description renders the icon depending on if it is and iron icon or a custom icon as an html @returns { HTML }
renderIcon() {
    if ( (!this.icon ) || (this.icon == "iron-") ) {
      return html``;
    }
    if (this.icon.startsWith('iron-')) {
      let icon = this.icon.split("-").slice(1).join('-');
      return html`<iron-icon class="icon ${this.sizeIcon ? this.sizeIcon : ''}" icon="${icon}" style="${styleMap(this.getIconSizeStyles())}"></iron-icon>`;
    }
    if (this._isCustomIcon(this.icon)) {
      let icon = this.icon.split("-").slice(1).join('-');
      return html`<svg class="icon rp ${this.sizeIconSVG ? this.sizeIconSVG : ''}" viewBox="${this._calculateViewBox()}" style="${styleMap(this.getIconSizeStyles())}" xmlns="http://www.w3.org/2000/svg">${this._renderCustomIcon(icon)}</svg>`;
    }
    if(this.ucdlib) {
      let icon = this.icon.split("-").slice(1).join('-');
      return html`<ucdlib-icon icon="${this.iconset}:${icon}" ></ucdlib-icon>`;
    }
    return html``;
  }
renderIcon ( ) { if ( ( ! this . icon ) || ( this . icon == "iron-" ) ) { return html ` ` ; } if ( this . icon . startsWith ( 'iron-' ) ) { let icon = this . icon . split ( "-" ) . slice ( 1 ) . join ( '-' ) ; return html ` ${ this . sizeIcon ? this . sizeIcon : '' } ${ icon } ${ styleMap ( this . getIconSizeStyles ( ) ) } ` ; } if ( this . _isCustomIcon ( this . icon ) ) { let icon = this . icon . split ( "-" ) . slice ( 1 ) . join ( '-' ) ; return html ` ${ this . sizeIconSVG ? this . sizeIconSVG : '' } ${ this . _calculateViewBox ( ) } ${ styleMap ( this . getIconSizeStyles ( ) ) } ${ this . _renderCustomIcon ( icon ) } ` ; } if ( this . ucdlib ) { let icon = this . icon . split ( "-" ) . slice ( 1 ) . join ( '-' ) ; return html ` ${ this . iconset } ${ icon } ` ; } return html ` ` ; }
@method renderIcon
 @description renders the icon depending on if it is
 and iron icon or a custom icon as an html
 @returns {HTML}
@method renderIcon @description renders the icon depending on if it is and iron icon or a custom icon as an html @returns { HTML }