Skip to content

Bug in hlm-dialog with icons #446

Closed
Closed
@Impre-visible

Description

@Impre-visible

Please provide the environment you discovered this bug in.

import { Component } from '@angular/core';
import { lucideX, lucidePlus } from '@ng-icons/lucide';
import { NgIcon, provideIcons } from '@ng-icons/core';
import { BrnDialogComponent, BrnDialogImports } from '@spartan-ng/ui-dialog-brain';
import { HlmDialogImports } from '@spartan-ng/ui-dialog-helm';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [NgIcon],
  viewProviders: [provideIcons({ lucideX, lucidePlus })],
  template: `
  <hlm-dialog-content *brnDialogContent="let ctx" class="max-w-4xl">
	  <hlm-dialog-header>
	      <h3 hlmDialogTitle hlm>Icon in dialog test</h3>
	  </hlm-dialog-header>
	  <div hlmDialogOverlay class="max-w-none">
	      <div hlmDialogContent class="!max-w-none">
	          <ng-icon name="lucideX" />
	      	  <ng-icon name="lucidePlus" />
    	  </div>
      </div>
  </hlm-dialog-content>
  `,
})
export class App {}

Which area/package is the issue in?

dialog

Description

When you want to register/provide an icon, and display it in a hlm-dialog, it don't show up if you didn't provided it in the root AppComponent.

Please provide the exception or error you saw

"No icon named ... was found. You may need to import it using the withIcons function."

Other information

Here's the discord discussion when we found the issue: https://discord.com/channels/1145362148621557921/1304180397067731085

I would be willing to submit a PR to fix this issue

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds reproductionNeed a way to reproduce this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions