Skip to content

Commit 741ad59

Browse files
committed
Update custom tab story
1 parent d6e8dff commit 741ad59

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/tabs/tabs.stories.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ storiesOf("Tabs", module)
2828
}))
2929
.add("With template", () => ({
3030
template: `
31-
<ng-template #customTab>
31+
<ng-template #customTabs let-item>
32+
{{item ? item.name : "wait for it"}}
33+
</ng-template>
34+
<ng-template #iconTab>
3235
<div style="height: 14px;">
3336
Something custom
3437
<svg width="16" height="16" viewBox="0 0 16 16"
@@ -40,14 +43,18 @@ storiesOf("Tabs", module)
4043
</div>
4144
</ng-template>
4245
<ibm-tabs [followFocus]="followFocus" [isNavigation]="isNavigation">
43-
<ibm-tab heading="one">foo</ibm-tab>
44-
<ibm-tab heading="two">bar</ibm-tab>
45-
<ibm-tab [heading]="customTab">foo</ibm-tab>
46+
<ibm-tab *ngFor="let item of data; let i = index;" [heading]="customTabs" [context]="item">Tab Content {{i + 1}}</ibm-tab>
47+
<ibm-tab [heading]="iconTab">Tab Content 4</ibm-tab>
4648
</ibm-tabs>
4749
`,
4850
props: {
4951
followFocus: boolean("followFocus", true),
50-
isNavigation: boolean("isNavigation", false)
52+
isNavigation: boolean("isNavigation", false),
53+
data: [
54+
{ name: "one" },
55+
{ name: "two" },
56+
{ name: "three" }
57+
]
5158
}
5259
}))
5360
.add("Skeleton", () => ({

0 commit comments

Comments
 (0)