public addCustomIcon()

in src/components/icon/icon-importer.ts [175:189]


  public addCustomIcon (customIcon: CustomIcon): void {
    // If icon already exists with same content, no need to proceed
    if (this.customIcons.get(customIcon.name) === customIcon.base64Svg) {
      return;
    }

    this.customIcons.set(customIcon.name, customIcon.base64Svg);

    // Recreate all styles including both default and custom icons
    this.cleanupExistingPortal();
    this.createIconStyles({
      ...this.defaultIconMappings,
      ...Object.fromEntries(this.customIcons)
    });
  }