Skip to content

Commit 4c3eb39

Browse files
author
Ben Grynhaus
committed
Allow CommandBar items (and far items) to specify how they should be renderered
1 parent 7425f3b commit 4c3eb39

File tree

4 files changed

+222
-255
lines changed

4 files changed

+222
-255
lines changed

apps/demo/src/app/app.component.html

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,29 @@ <h2>Getting up and running...</h2>
1717

1818
<div style="height: 500vh">
1919

20-
<!-- <fab-tag-picker [resolveSuggestions]="tagPicker.resolveSuggestions" [getTextFromItem]="tagPicker.getTextFromItem" [pickerSuggestionsOptions]="tagPicker.pickerSuggestionsOptions"
21-
[itemLimit]="2">
22-
</fab-tag-picker> -->
23-
24-
<fab-fabric>
25-
<fab-tag-picker [resolveSuggestions]="getList" [emptyInputFocus]="getList" [getTextFromItem]="getTextFromItem" [pickerSuggestionsOptions]="{
26-
suggestionsHeaderText: 'Suggested Tags',
27-
noResultsFoundText: 'No Color Tags Found'
28-
}" [itemLimit]="2"></fab-tag-picker>
29-
</fab-fabric>
30-
31-
<fab-search-box
32-
placeholder="Search">
33-
</fab-search-box>
20+
<fab-command-bar #commandBar [items]="commandBarItems" [farItems]="commandBarFarItems">
21+
</fab-command-bar>
22+
23+
<fab-default-button (onClick)="toggleRun()" text="Toggle run"></fab-default-button>
24+
25+
<fab-panel [isOpen]="isPanelOpen" (onDismiss)="isPanelOpen = false">
26+
</fab-panel>
27+
28+
<ng-template #customRange let-item="item">
29+
<div>
30+
Data: {{ item.data | json }}
31+
</div>
32+
33+
<div>
34+
<span>From: </span>
35+
<input type="date" />
36+
</div>
37+
38+
<div>
39+
<span>To: </span>
40+
<input type="date" />
41+
</div>
42+
43+
<fab-default-button text="Done" (onClick)="item.onClick()"></fab-default-button>
44+
</ng-template>
3445
</div>

0 commit comments

Comments
 (0)