@@ -10,6 +10,7 @@ import {
1010 EuiFilePicker ,
1111 EuiRange ,
1212 EuiSelect ,
13+ EuiSpacer ,
1314 EuiSwitch ,
1415 EuiPanel ,
1516} from '../../../../src/components' ;
@@ -57,9 +58,16 @@ export default class extends Component {
5758 ] ,
5859 radioIdSelected : `${ idPrefix } 5` ,
5960 comboBoxSelectionOptions : [ ] ,
61+ value : '20' ,
6062 } ;
6163 }
6264
65+ onRangeChange = e => {
66+ this . setState ( {
67+ value : e . target . value ,
68+ } ) ;
69+ } ;
70+
6371 onSwitchChange = ( ) => {
6472 this . setState ( {
6573 isSwitchChecked : ! this . state . isSwitchChecked ,
@@ -92,45 +100,58 @@ export default class extends Component {
92100 < EuiFormRow
93101 label = "Text field"
94102 helpText = "I am some friendly help text."
95- compressed >
96- < EuiFieldText name = "first" isLoading />
103+ display = "columnCompressed" >
104+ < EuiFieldText name = "first" isLoading compressed />
97105 </ EuiFormRow >
98106
99- < EuiFormRow label = "Select" compressed >
107+ < EuiFormRow label = "Select" display = "columnCompressed" >
100108 < EuiSelect
101109 options = { [
102110 { value : 'option_one' , text : 'Option one' } ,
103111 { value : 'option_two' , text : 'Option two' } ,
104112 { value : 'option_three' , text : 'Option three' } ,
105113 ] }
114+ compressed
106115 />
107116 </ EuiFormRow >
108117
109- < EuiFormRow label = "File picker" compressed >
110- < EuiFilePicker />
118+ < EuiFormRow label = "File picker" display = "columnCompressed" >
119+ < EuiFilePicker compressed display = "default" />
111120 </ EuiFormRow >
112121
113- < EuiFormRow label = "Combo box" compressed >
122+ < EuiFormRow
123+ label = "Comboboxwithalonglabelname"
124+ display = "columnCompressed" >
114125 < EuiComboBox
115126 options = { [
116127 { label : 'Option one' } ,
117128 { label : 'Option two' } ,
118129 { label : 'Option three' } ,
119130 ] }
131+ compressed
120132 selectedOptions = { this . state . comboBoxSelectionOptions }
121133 onChange = { comboBoxSelectionOptions =>
122134 this . setState ( { comboBoxSelectionOptions } )
123135 }
124136 />
125137 </ EuiFormRow >
126138
127- < EuiFormRow label = "Range" compressed >
128- < EuiRange min = { 0 } max = { 100 } name = "range" id = "range" />
139+ < EuiFormRow label = "Range" display = "columnCompressed" >
140+ < EuiRange
141+ min = { 0 }
142+ max = { 100 }
143+ name = "range"
144+ id = "range"
145+ showInput
146+ compressed
147+ value = { this . state . value }
148+ onChange = { this . onRangeChange }
149+ />
129150 </ EuiFormRow >
130151
131152 < EuiFormRow
132153 label = "Use a switch instead of a single checkbox"
133- compressed >
154+ display = "rowCompressed" >
134155 < EuiSwitch
135156 label = "Should we do this?"
136157 name = "switch"
@@ -139,14 +160,17 @@ export default class extends Component {
139160 />
140161 </ EuiFormRow >
141162
142- < EuiFormRow label = "Checkboxes" compressed >
163+ < EuiFormRow label = "Checkboxes" display = "rowCompressed" >
143164 < EuiCheckboxGroup
144165 options = { this . state . checkboxes }
145166 idToSelectedMap = { this . state . checkboxIdToSelectedMap }
146167 onChange = { this . onCheckboxChange }
168+ compressed
147169 />
148170 </ EuiFormRow >
149171
172+ < EuiSpacer size = "s" />
173+
150174 < EuiButton type = "submit" size = "s" fill >
151175 Save form
152176 </ EuiButton >
0 commit comments