Skip to content

Commit

Permalink
Drop support of raised table button because of no usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sambaptista committed Feb 7, 2023
1 parent d55bc81 commit 0f2073c
Showing 1 changed file with 46 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,121 +6,53 @@
<span *ngIf="label">{{ label }}</span>
</span>

<ng-container *ngIf="!raised">
<!-- App routed link with label... -->
<a
*ngIf="type === 'routerLink' && label"
[color]="color"
[queryParams]="queryParams"
[queryParamsHandling]="queryParamsHandling"
[routerLink]="navigate"
[fragment]="fragment"
[preserveFragment]="preserveFragment"
mat-button
>
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
<span>{{ label }}</span>
</a>

<!-- ... and without label -->
<a
*ngIf="type === 'routerLink' && !label"
[color]="color"
[queryParams]="queryParams"
[queryParamsHandling]="queryParamsHandling"
[routerLink]="navigate"
[fragment]="fragment"
[preserveFragment]="preserveFragment"
mat-icon-button
>
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
</a>

<!-- Click with label... -->
<a *ngIf="type === 'click' && label" [color]="color" (click)="buttonClick.emit($event)" mat-button>
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
<span>{{ label }}</span>
</a>

<!-- ... and without label -->
<a *ngIf="type === 'click' && !label" (click)="buttonClick.emit($event)" mat-icon-button>
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
</a>

<!-- External link with label... -->
<a *ngIf="type === 'href' && label" [attr.href]="href" [color]="color" mat-button target="_blank">
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
<span>{{ label }}</span>
</a>

<!-- ... and without label -->
<a *ngIf="type === 'href' && !label" [attr.href]="href" [color]="color" mat-icon-button target="_blank">
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
</a>
</ng-container>

<ng-container *ngIf="raised">
<!-- App routed link with label... -->
<a
*ngIf="type === 'routerLink' && label"
[color]="color"
[queryParams]="queryParams"
[queryParamsHandling]="queryParamsHandling"
[routerLink]="navigate"
[fragment]="fragment"
[preserveFragment]="preserveFragment"
mat-raised-button
>
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
<span>{{ label }}</span>
</a>
<!-- App routed link with label... -->
<a
*ngIf="type === 'routerLink' && label"
[color]="color"
[queryParams]="queryParams"
[queryParamsHandling]="queryParamsHandling"
[routerLink]="navigate"
[fragment]="fragment"
[preserveFragment]="preserveFragment"
mat-button
>
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
<span>{{ label }}</span>
</a>

<!-- ... and without label -->
<a
*ngIf="type === 'routerLink' && !label"
[color]="color"
[queryParams]="queryParams"
[queryParamsHandling]="queryParamsHandling"
[routerLink]="navigate"
[fragment]="fragment"
[preserveFragment]="preserveFragment"
mat-icon-button
>
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
</a>

<!-- ... and without label -->
<a
*ngIf="type === 'routerLink' && !label"
[color]="color"
[queryParams]="queryParams"
[queryParamsHandling]="queryParamsHandling"
[routerLink]="navigate"
[fragment]="fragment"
[preserveFragment]="preserveFragment"
mat-icon-button
class="mat-elevation-z4"
>
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
</a>
<!-- Click with label... -->
<a *ngIf="type === 'click' && label" [color]="color" (click)="buttonClick.emit($event)" mat-raised-button>
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
<span>{{ label }}</span>
</a>
<!-- Click with label... -->
<a *ngIf="type === 'click' && label" [color]="color" (click)="buttonClick.emit($event)" mat-button>
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
<span>{{ label }}</span>
</a>

<!-- ... and without label -->
<a
*ngIf="type === 'click' && !label"
[color]="color"
(click)="buttonClick.emit($event)"
mat-icon-button
class="mat-elevation-z4"
>
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
</a>
<!-- ... and without label -->
<a *ngIf="type === 'click' && !label" (click)="buttonClick.emit($event)" mat-icon-button>
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
</a>

<!-- External link with label... -->
<a *ngIf="type === 'href' && label" [attr.href]="href" [color]="color" mat-raised-button target="_blank">
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
<span>{{ label }}</span>
</a>
<!-- External link with label... -->
<a *ngIf="type === 'href' && label" [attr.href]="href" [color]="color" mat-button target="_blank">
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
<span>{{ label }}</span>
</a>

<!-- ... and without label -->
<a
*ngIf="type === 'href' && !label"
[attr.href]="href"
[color]="color"
mat-icon-button
class="mat-elevation-z4"
target="_blank"
>
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
</a>
</ng-container>
<!-- ... and without label -->
<a *ngIf="type === 'href' && !label" [attr.href]="href" [color]="color" mat-icon-button target="_blank">
<natural-icon *ngIf="icon" [name]="icon"></natural-icon>
</a>

0 comments on commit 0f2073c

Please sign in to comment.