Skip to content

Commit f017d40

Browse files
committed
Add demo of new segmentedControl input
1 parent 8593738 commit f017d40

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

client-app/src/desktop/tabs/forms/InputsPanel.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
jsonInput,
1212
numberInput,
1313
radioInput,
14+
segmentedControl,
1415
slider,
1516
switchInput,
1617
textArea,
@@ -321,6 +322,18 @@ const column3 = hoistCmp.factory<InputsPanelModel>(() =>
321322
]
322323
})
323324
}),
325+
demoRow({
326+
label: 'SegmentedControl',
327+
info: 'Icon + text options',
328+
item: segmentedControl({
329+
bind: 'segmentedControl',
330+
options: [
331+
{label: 'Button 1', value: 'button1', icon: Icon.chartLine()},
332+
{label: 'Button 2', value: 'button2', icon: Icon.gear()},
333+
{label: 'Button 3', value: 'button3', icon: Icon.skull()}
334+
]
335+
})
336+
}),
324337
demoRow({
325338
label: 'RadioInput',
326339
info: 'inline, disabled option',
@@ -459,6 +472,7 @@ class InputsPanelModel extends HoistModel {
459472
@bindable checkboxButton: boolean = null;
460473
@bindable buttonGroupInput: string = 'button2';
461474
@bindable buttonGroupInput2: string = 'button2';
475+
@bindable segmentedControl: string = 'button2';
462476
@bindable radioInput: string = null;
463477

464478
constructor() {

0 commit comments

Comments
 (0)