diff options
author | Israel Lavi <il0695@att.com> | 2018-08-07 10:54:17 +0300 |
---|---|---|
committer | Israel Lavi <il0695@att.com> | 2018-08-07 11:06:44 +0300 |
commit | b2a3acea0d0f66028c9ce5fad02d4ecc64abf70c (patch) | |
tree | 8d70110f34cb845965c42a5915e950bca967d2c3 /src/angular/form-elements/checkbox | |
parent | 05b37297177e8a342668c15e5d6f738b51f7aedd (diff) |
Initial commit.
Adding files needed for Linux Foundation.
Change-Id: I9f2b4851a5ae01f83800c7f8bab8608a2221c730
Issue-ID: SDC-1608
Signed-off-by: Israel Lavi <il0695@att.com>
Diffstat (limited to 'src/angular/form-elements/checkbox')
3 files changed, 4 insertions, 4 deletions
diff --git a/src/angular/form-elements/checkbox/checkbox.component.html.ts b/src/angular/form-elements/checkbox/checkbox.component.html.ts index f4031db..3fdd53f 100644 --- a/src/angular/form-elements/checkbox/checkbox.component.html.ts +++ b/src/angular/form-elements/checkbox/checkbox.component.html.ts @@ -1,7 +1,7 @@ -export default ` +export const template = ` <div class="sdc-checkbox"> <label SdcRippleClickAnimation [rippleClickDisabled]="disabled"> - <input type="checkbox" class="sdc-checkbox__input" [ngModel]="checked" (ngModelChange)="toggleState($event)" [disabled]="disabled"> + <input type="checkbox" class="sdc-checkbox__input" [ngModel]="checked" (ngModelChange)="toggleState($event)" [disabled]="disabled" [attr.data-tests-id]="testId"> <span class="sdc-checkbox__label">{{ label }}</span> </label> </div> diff --git a/src/angular/form-elements/checkbox/checkbox.component.spec.ts b/src/angular/form-elements/checkbox/checkbox.component.spec.ts index 36f478e..8fc63e2 100644 --- a/src/angular/form-elements/checkbox/checkbox.component.spec.ts +++ b/src/angular/form-elements/checkbox/checkbox.component.spec.ts @@ -3,7 +3,6 @@ import { CheckboxComponent } from "./checkbox.component"; import { AnimationDirectivesModule } from "../../animations/animation-directives.module"; import { FormsModule } from "@angular/forms"; - describe("Checbox Tests", ()=>{ let component: CheckboxComponent; beforeEach(async(() => { diff --git a/src/angular/form-elements/checkbox/checkbox.component.ts b/src/angular/form-elements/checkbox/checkbox.component.ts index ec05eac..2b50e6d 100644 --- a/src/angular/form-elements/checkbox/checkbox.component.ts +++ b/src/angular/form-elements/checkbox/checkbox.component.ts @@ -1,5 +1,5 @@ import { Component, Input, Output, EventEmitter, ViewEncapsulation } from '@angular/core'; -import template from "./checkbox.component.html"; +import { template } from "./checkbox.component.html"; @Component({ selector: 'sdc-checkbox', @@ -10,6 +10,7 @@ export class CheckboxComponent { @Input() label:string; @Input() checked:boolean; @Input() disabled:boolean; + @Input() testId: string; @Output() checkedChange:EventEmitter<any> = new EventEmitter<any>(); public toggleState(newState:boolean) { |