Skip to content

Commit 85548d9

Browse files
committed
feat(breadcrumb): Add skeleton state
1 parent aea73dc commit 85548d9

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

src/breadcrumb/breadcrumb-item.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
</ng-template>`
1818
})
1919
export class BreadcrumbItemComponent {
20-
@Input() href: string;
20+
@Input() href = "/#";
2121

2222
@HostBinding("class.bx--breadcrumb-item") itemClass = true;
2323
}

src/breadcrumb/breadcrumb.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const MINIMUM_OVERFLOW_THRESHOLD = 4;
1212
template: `
1313
<nav #nav class="bx--breadcrumb"
1414
[ngClass]="{
15+
'bx--skeleton' : skeleton,
1516
'bx--breadcrumb--no-trailing-slash' : noTrailingSlash
1617
}"
1718
[attr.aria-label]="ariaLabel">
@@ -57,6 +58,8 @@ export class Breadcrumb {
5758

5859
@Input() ariaLabel: string;
5960

61+
@Input() skeleton = false;
62+
6063
protected _threshold: number;
6164

6265
@Input()

src/breadcrumb/breadcrumb.stories.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,16 @@ storiesOf("Breadcrumb", module)
5757
threshold: number("threshold", 4),
5858
items: createBreadcrumbItems
5959
}
60+
}))
61+
.add("Skeleton", () => ({
62+
template: `
63+
<ibm-breadcrumb skeleton="true" [noTrailingSlash]="noTrailingSlash">
64+
<ibm-breadcrumb-item></ibm-breadcrumb-item>
65+
<ibm-breadcrumb-item></ibm-breadcrumb-item>
66+
<ibm-breadcrumb-item></ibm-breadcrumb-item>
67+
<ibm-breadcrumb-item></ibm-breadcrumb-item>
68+
</ibm-breadcrumb>`,
69+
props: {
70+
noTrailingSlash: boolean("noTrailingSlash", true)
71+
}
6072
}));

0 commit comments

Comments
 (0)