@@ -76,8 +76,9 @@ class InputBase extends React.Component {
76
76
77
77
let inputGroupClassName ;
78
78
switch ( this . props . bsSize ) {
79
- case 'small' : inputGroupClassName = 'input-group-sm' ; break ;
80
- case 'large' : inputGroupClassName = 'input-group-lg' ; break ;
79
+ case 'small' : inputGroupClassName = 'input-group-sm' ; break ;
80
+ case 'large' : inputGroupClassName = 'input-group-lg' ; break ;
81
+ default :
81
82
}
82
83
83
84
return addonBefore || addonAfter || buttonBefore || buttonAfter ? (
@@ -98,10 +99,10 @@ class InputBase extends React.Component {
98
99
}
99
100
100
101
switch ( this . props . bsStyle ) {
101
- case 'success' : return < Glyphicon formControlFeedback glyph = "ok" key = "icon" /> ;
102
- case 'warning' : return < Glyphicon formControlFeedback glyph = "warning-sign" key = "icon" /> ;
103
- case 'error' : return < Glyphicon formControlFeedback glyph = "remove" key = "icon" /> ;
104
- default : return < span className = "form-control-feedback" key = "icon" /> ;
102
+ case 'success' : return < Glyphicon formControlFeedback glyph = "ok" key = "icon" /> ;
103
+ case 'warning' : return < Glyphicon formControlFeedback glyph = "warning-sign" key = "icon" /> ;
104
+ case 'error' : return < Glyphicon formControlFeedback glyph = "remove" key = "icon" /> ;
105
+ default : return < span className = "form-control-feedback" key = "icon" /> ;
105
106
}
106
107
} else {
107
108
return null ;
@@ -157,24 +158,24 @@ class InputBase extends React.Component {
157
158
}
158
159
159
160
switch ( this . props . type ) {
160
- case 'select' :
161
- return (
162
- < select { ...this . props } className = { classNames ( this . props . className , 'form-control' ) } ref = "input" key = "input" >
163
- { this . props . children }
164
- </ select >
165
- ) ;
166
- case 'textarea' :
167
- return < textarea { ...this . props } className = { classNames ( this . props . className , 'form-control' ) } ref = "input" key = "input" /> ;
168
- case 'static' :
169
- return (
170
- < p { ...this . props } className = { classNames ( this . props . className , 'form-control-static' ) } ref = "input" key = "input" >
171
- { this . props . value }
172
- </ p >
173
- ) ;
161
+ case 'select' :
162
+ return (
163
+ < select { ...this . props } className = { classNames ( this . props . className , 'form-control' ) } ref = "input" key = "input" >
164
+ { this . props . children }
165
+ </ select >
166
+ ) ;
167
+ case 'textarea' :
168
+ return < textarea { ...this . props } className = { classNames ( this . props . className , 'form-control' ) } ref = "input" key = "input" /> ;
169
+ case 'static' :
170
+ return (
171
+ < p { ...this . props } className = { classNames ( this . props . className , 'form-control-static' ) } ref = "input" key = "input" >
172
+ { this . props . value }
173
+ </ p >
174
+ ) ;
175
+ default :
176
+ const className = this . isCheckboxOrRadio ( ) || this . isFile ( ) ? '' : 'form-control' ;
177
+ return < input { ...this . props } className = { classNames ( this . props . className , className ) } ref = "input" key = "input" /> ;
174
178
}
175
-
176
- let className = this . isCheckboxOrRadio ( ) || this . isFile ( ) ? '' : 'form-control' ;
177
- return < input { ...this . props } className = { classNames ( this . props . className , className ) } ref = "input" key = "input" /> ;
178
179
}
179
180
180
181
renderFormGroup ( children ) {
0 commit comments