aboutsummaryrefslogtreecommitdiffstats
path: root/src/angular/form-elements/text-elements/input/input.component.html.ts
blob: bb5d788f6091a408e1e63842b10186e1cc530b4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
export const template = `
<div class="sdc-input ">
    <label class="sdc-input__label" *ngIf="label" [ngClass]="{'required':required}">{{label}}</label>
    <input
        class="sdc-input__input {{classNames}}"
        [ngClass]="{'error': (!valid && dirty), 'disabled':disabled}"
        [attr.name]="name ? name : null"
        [placeholder]="placeHolder"
        [(ngModel)]="value"
        [maxlength]="maxLength"
        [minlength]="minLength"
        [type]="type"
        [formControl]="control"
        [attr.disabled]="disabled ? 'disabled' : null"
        (input)="onKeyPress($event.target.value)"
        [attr.data-tests-id]="testId"
    />
</div>
`;