fix icon placement in password input (#11720)

This commit is contained in:
Jordan Aasen 2024-10-28 02:20:55 -07:00 committed by GitHub
parent e3f9035564
commit 2e3ad82b60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 29 additions and 28 deletions

View File

@ -14,13 +14,13 @@
<bit-form-field> <bit-form-field>
<bit-label>{{ (passwordRemoved ? "newPassword" : "password") | i18n }}</bit-label> <bit-label>{{ (passwordRemoved ? "newPassword" : "password") | i18n }}</bit-label>
<input bitInput type="password" formControlName="password" /> <input bitInput type="password" formControlName="password" />
<ng-container *ngIf="!hasPassword">
<button <button
data-testid="toggle-visibility-for-password" data-testid="toggle-visibility-for-password"
type="button" type="button"
bitIconButton bitIconButton
bitSuffix bitSuffix
bitPasswordInputToggle bitPasswordInputToggle
*ngIf="!hasPassword"
></button> ></button>
<button <button
type="button" type="button"
@ -30,6 +30,7 @@
[disabled]="!config.areSendsAllowed" [disabled]="!config.areSendsAllowed"
(click)="generatePassword()" (click)="generatePassword()"
data-testid="generate-password" data-testid="generate-password"
*ngIf="!hasPassword"
></button> ></button>
<button <button
type="button" type="button"
@ -40,8 +41,8 @@
[valueLabel]="'password' | i18n" [valueLabel]="'password' | i18n"
[appCopyClick]="sendOptionsForm.get('password').value" [appCopyClick]="sendOptionsForm.get('password').value"
showToast showToast
*ngIf="!hasPassword"
></button> ></button>
</ng-container>
<button <button
*ngIf="hasPassword" *ngIf="hasPassword"
class="tw-border-l-0 last:tw-rounded-r focus-visible:tw-border-l focus-visible:tw-ml-[-1px]" class="tw-border-l-0 last:tw-rounded-r focus-visible:tw-border-l focus-visible:tw-ml-[-1px]"