Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yerramshilpa committed Oct 2, 2023
1 parent 894c915 commit 5944752
Showing 1 changed file with 27 additions and 16 deletions.
43 changes: 27 additions & 16 deletions libs/packages/sam-formly/src/lib/formly/types/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,33 @@ import { FieldType } from '@ngx-formly/core';

@Component({
selector: 'sds-formly-field-input',
template: `
<div class="maxw-mobile-lg position-relative">
<input [ngClass]="{
'usa-input--disabled': to.disabled,
'usa-input--error': showError
}" class="usa-input padding-right-3" [placeholder]="to.placeholder" name="input-success"
[formlyAttributes]="field" [type]="to.inputType ? to.inputType : 'text'" [formControl]="formControl" />
<ng-container *ngIf="field.formControl.value">
<span class="position-absolute right-105 top-1 cursor-pointer bg-white">
<span role="button" aria-label="Clear input" (click)="field.formControl.reset()" (keyup.enter)="field.formControl.reset()" tabindex="0"
class="icon-container">
<usa-icon [icon]="'x'" size="lg" class="font-sans-xs"></usa-icon>
template: ` <div class="maxw-mobile-lg position-relative">
<input
[ngClass]="{
'usa-input--disabled': to.disabled,
'usa-input--error': showError
}"
class="usa-input padding-right-3"
[placeholder]="to.placeholder"
name="input-success"
[formlyAttributes]="field"
[type]="to.inputType ? to.inputType : 'text'"
[formControl]="formControl"
/>
<ng-container *ngIf="field.formControl.value">
<span class="position-absolute right-105 top-1 cursor-pointer bg-white">
<span
role="button"
aria-label="Clear input"
(click)="field.formControl.reset()"
(keyup.enter)="field.formControl.reset()"
tabindex="0"
class="icon-container"
>
<usa-icon [icon]="'x'" size="lg" class="font-sans-xs"></usa-icon>
</span>
</span>
</span>
</ng-container>
</div>`
</ng-container>
</div>`,
})
export class FormlyFieldInputComponent extends FieldType {}

0 comments on commit 5944752

Please sign in to comment.