Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button | Remove wrapper span elements from icon templates #15582

Closed
cetincakiroglu opened this issue May 15, 2024 · 2 comments · Fixed by #15583 · 4 remaining pull requests
Closed

Button | Remove wrapper span elements from icon templates #15582

cetincakiroglu opened this issue May 15, 2024 · 2 comments · Fixed by #15583 · 4 remaining pull requests
Assignees
Labels
PRO Support Issue was reported by PRO User Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@cetincakiroglu
Copy link
Contributor

Span elements wrapping around the icon templates may cause styling issues in other icon libraries. To prevent any additional styles coming from the PrimeNG, we'll remove wrapper span elements to allow users to customize their choice of icon. Additionally, a new class template parameter will be provided.

Example:

            <p-button label="Test Material Symbol icon">
                <ng-template pTemplate="icon" let-class="class">
                    <span class="material-symbols-outlined" [ngClass]="class">info</span>
                </ng-template>
            </p-button>
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working PRO Support Issue was reported by PRO User labels May 15, 2024
@cetincakiroglu cetincakiroglu added this to the 17.16.2 milestone May 15, 2024
@cetincakiroglu cetincakiroglu self-assigned this May 15, 2024
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 15, 2024
@cetincakiroglu cetincakiroglu removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 15, 2024
cetincakiroglu added a commit that referenced this issue May 15, 2024
Fixes #15582 - Button | Remove wrapper span element from icon templates
@rokamon1997
Copy link

Is it possible this broke the "pi-spin" icon functionality? With version 17.17.0 simple button with pi-spin class doesn't seem to work anymore.

This does not work.
<p-button icon="pi pi-spinner pi-spin"></p-button>

Temporary fix for me is to use classic button with pButton directive instead.

@rokamon1997
Copy link

Neither does this work if I try to use the loading properties. The spinner icon and spinning works but when loading stops it doesn't show the correct icon.

<p-button icon="pi pi-step-forward" loadingIcon="pi pi-spinner" [loading]="loading()"></p-button>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment