1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 22:33:35 +00:00

[SM-478] Resolve introduced eslint errors for button type (#4612)

This commit is contained in:
Oscar Hinton
2023-02-14 18:13:53 +01:00
committed by GitHub
parent bc60a34e50
commit 5dc1775cfc
16 changed files with 74 additions and 42 deletions

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<div
class="tw-flex tw-items-center tw-gap-2 tw-p-2 tw-pl-4 tw-text-contrast"
[ngClass]="bannerClass"
@@ -11,6 +9,7 @@
<ng-content></ng-content>
</span>
<button
type="button"
bitIconButton="bwi-close"
buttonType="contrast"
size="default"

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<ng-container *ngFor="let breadcrumb of beforeOverflow; let last = last">
<ng-container *ngIf="breadcrumb.route">
<a
@@ -14,6 +12,7 @@
</ng-container>
<ng-container *ngIf="!breadcrumb.route">
<button
type="button"
bitLink
linkType="primary"
class="tw-my-2 tw-inline-block"
@@ -29,6 +28,7 @@
<i *ngIf="beforeOverflow.length > 0" class="bwi bwi-angle-right tw-mx-1.5 tw-text-main"></i>
<button
type="button"
bitIconButton="bwi-ellipsis-h"
[bitMenuTriggerFor]="overflowMenu"
size="small"
@@ -48,7 +48,7 @@
</a>
</ng-container>
<ng-container *ngIf="!breadcrumb.route">
<button bitMenuItem linkType="primary" (click)="breadcrumb.onClick($event)">
<button type="button" bitMenuItem linkType="primary" (click)="breadcrumb.onClick($event)">
<ng-container [ngTemplateOutlet]="breadcrumb.content"></ng-container>
</button>
</ng-container>
@@ -70,6 +70,7 @@
</ng-container>
<ng-container *ngIf="!breadcrumb.route">
<button
type="button"
bitLink
linkType="primary"
class="tw-my-2 tw-inline-block"

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<bit-simple-dialog>
<i bit-dialog-icon class="bwi tw-text-3xl" [class]="iconClasses" aria-hidden="true"></i>
@@ -8,12 +6,18 @@
<div bitDialogContent>{{ content }}</div>
<div bitDialogFooter class="tw-flex tw-flex-row tw-gap-2">
<button bitButton buttonType="primary" (click)="dialogRef.close(SimpleDialogCloseType.ACCEPT)">
<button
type="button"
bitButton
buttonType="primary"
(click)="dialogRef.close(SimpleDialogCloseType.ACCEPT)"
>
{{ acceptButtonText }}
</button>
<button
*ngIf="showCancelButton"
type="button"
bitButton
buttonType="secondary"
(click)="dialogRef.close(SimpleDialogCloseType.CANCEL)"

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<!-- This a higher order component that composes `NavItemComponent` -->
<bit-nav-item
[text]="text"
@@ -13,6 +11,7 @@
>
<ng-template #button>
<button
type="button"
class="tw-ml-auto"
[bitIconButton]="
open ? 'bwi-angle-up' : variant === 'tree' ? 'bwi-angle-right' : 'bwi-angle-down'

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<div
class="tw-relative"
[ngClass]="[
@@ -28,6 +26,7 @@
}"
>
<button
type="button"
class="tw-invisible"
[bitIconButton]="'bwi-angle-down'"
size="small"
@@ -65,6 +64,7 @@
<ng-template #isButton>
<!-- Class field should match `#isAnchor` class field above -->
<button
type="button"
class="fvw tw-w-full tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap tw-border-none tw-bg-transparent tw-p-0 tw-text-start !tw-text-alt2 hover:tw-text-alt2 hover:tw-no-underline focus:tw-outline-none [&>:not(.bwi)]:hover:tw-underline"
(click)="mainContentClicked.emit()"
>