I have this button with a fa icon.
<p-button><i class="fa fa-thumb-tack" [ngClass]="{'active': pinned}"></i></p-button>
Is there anyway that I can just display the icon and not the button (making the icon clickable basically).
I have this button with a fa icon.
<p-button><i class="fa fa-thumb-tack" [ngClass]="{'active': pinned}"></i></p-button>
Is there anyway that I can just display the icon and not the button (making the icon clickable basically).
Maybe you have to customize your p-button style, like making its background opacity as 0.
Or you can just display only the icon and bind event to it:
<i class="fa fa-thumb-tack" [ngClass]="{'active': pinned}" (click)="something()"></i>
However you have to make it by yourself, since PrimseNG doesn't support that kind of icon button.
The apparently has a yellow background set. You can try:
<p-button style='background-color: transparent; border: none'>
<i style='color:silver' class="fa fa-thumb-tack" [ngClass]="{'active': pinned}"></i>
</p-button>
You can set the icons color to one that makes it more visible against the whitish background.