()
| 256 | } |
| 257 | |
| 258 | render () { |
| 259 | let { hintType, layout, className } = this.props; |
| 260 | if (!hintType) { |
| 261 | hintType = layout === 'inline' ? 'pop' : 'block'; |
| 262 | } |
| 263 | |
| 264 | className = classnames( |
| 265 | className, |
| 266 | 'rct-control-group', |
| 267 | `rct-hint-${hintType}`, |
| 268 | { |
| 269 | 'rct-has-error': this.state.validations.length > 0 |
| 270 | } |
| 271 | ); |
| 272 | |
| 273 | if (layout === 'inline') { |
| 274 | return this.renderInline(className); |
| 275 | } else { |
| 276 | return this.renderStacked(className); |
| 277 | } |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | FormControl.propTypes = { |
no test coverage detected