Skip to content

Commit f1d4674

Browse files
authored
Merge pull request #190 from youda97/master
Fix DAP issues for input
2 parents 0ad6ab5 + 0a92bb7 commit f1d4674

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/input/input.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ storiesOf("Input", module).addDecorator(
2020
}))
2121
.add("Input", () => ({
2222
template: `
23-
<input ibmText placeholder="Optional placeholder text"/>
23+
<input ibmText aria-label="input" placeholder="Optional placeholder text"/>
2424
`
2525
})).add("TextArea", () => ({
2626
template: `
27-
<textarea ibmTextArea placeholder="Optional placeholder text" rows="4" cols="50"></textarea>
27+
<textarea ibmTextArea aria-label="textarea" placeholder="Optional placeholder text" rows="4" cols="50"></textarea>
2828
`
2929
}));

src/input/label.component.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
import { Component, Input, AfterContentInit, ElementRef } from "@angular/core";
2-
1+
import {
2+
Component,
3+
Input,
4+
AfterContentInit,
5+
ElementRef,
6+
HostBinding
7+
} from "@angular/core";
38

49
/**
510
* ```html
@@ -26,10 +31,8 @@ import { Component, Input, AfterContentInit, ElementRef } from "@angular/core";
2631
@Component({
2732
selector: "ibm-label",
2833
template: `
29-
<div class="bx--form-item">
3034
<label [for]="labelInputID" class="bx--label"><ng-content></ng-content></label>
3135
<ng-content select="input,textarea,div"></ng-content>
32-
</div>
3336
`
3437
})
3538
export class LabelComponent implements AfterContentInit {
@@ -53,6 +56,8 @@ export class LabelComponent implements AfterContentInit {
5356
*/
5457
@Input() labelState: "success" | "warning" | "error" | "" = "";
5558

59+
@HostBinding("class.bx--form-item") labelComponentClass = true;
60+
5661
/**
5762
* Creates an instance of LabelComponent.
5863
* @param {ElementRef} elementRef

0 commit comments

Comments
 (0)