Skip to content

Commit 1d80e4e

Browse files
committed
Update stories
2 parents 19fffb7 + a9131b4 commit 1d80e4e

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

src/search/search.stories.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ storiesOf("Search", module).addDecorator(
1111
.addDecorator(withKnobs)
1212
.add("Basic", () => ({
1313
template: `
14-
<div style="width: 250px;">
1514
<ibm-search [theme]="theme" [placeholder]="placeholder" [disabled]="disabled" [size]="size"></ibm-search>
16-
</div>
1715
`,
1816
props: {
1917
size: select("size", ["lg", "sm"], "lg"),

src/select/select.component.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,16 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from "@angular/forms";
2828
selector: "ibm-select",
2929
template: `
3030
<div class="bx--form-item">
31+
<label *ngIf="skeleton" [attr.for]="id" class="bx--label bx--skeleton"></label>
3132
<div
3233
[ngClass]="{
3334
'bx--select--inline': display === 'inline',
34-
'bx--select--light': theme === 'light'
35+
'bx--select--light': theme === 'light',
36+
'bx--skeleton': skeleton
3537
}"
3638
class="bx--select"
3739
style="width: 100%">
38-
<label [attr.for]="id" class="bx--label">{{label}}</label>
40+
<label *ngIf="!skeleton" [attr.for]="id" class="bx--label">{{label}}</label>
3941
<select
4042
#select
4143
[attr.id]="id"
@@ -44,7 +46,7 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from "@angular/forms";
4446
class="bx--select-input">
4547
<ng-content></ng-content>
4648
</select>
47-
<svg class="bx--select__arrow" width="10" height="5" viewBox="0 0 10 5">
49+
<svg *ngIf="!skeleton" class="bx--select__arrow" width="10" height="5" viewBox="0 0 10 5">
4850
<path d="M0 0l5 4.998L10 0z" fill-rule="evenodd" />
4951
</svg>
5052
</div>
@@ -80,6 +82,10 @@ export class Select implements ControlValueAccessor {
8082
* Set to true to disable component.
8183
*/
8284
@Input() disabled = false;
85+
/**
86+
* Set to true for a loading select.
87+
*/
88+
@Input() skeleton = false;
8389
/**
8490
* `light` or `dark` select theme
8591
*/

src/select/select.stories.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,11 @@ storiesOf("Select", module).addDecorator(
4848
props: {
4949
model: "default"
5050
}
51+
}))
52+
.add("Skeleton", () => ({
53+
template: `
54+
<div style="width: 300px">
55+
<ibm-select skeleton="true"></ibm-select>
56+
</div>
57+
`
5158
}));

src/structured-list/structured-list.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ storiesOf("Structured List", module).addDecorator(
8686
`,
8787
props: {
8888
selected: action("row selected"),
89-
border: boolean("border", false),
89+
border: boolean("border", true),
9090
condensed: boolean("condensed", false),
9191
nowrap: boolean("nowrap", false)
9292
}
@@ -130,7 +130,7 @@ storiesOf("Structured List", module).addDecorator(
130130
<p>{{valueSelected}}</p>
131131
`,
132132
props: {
133-
border: boolean("border", false),
133+
border: boolean("border", true),
134134
condensed: boolean("condensed", false),
135135
nowrap: boolean("nowrap", false)
136136
}

0 commit comments

Comments
 (0)