[explore] include ControlHeader as part of Control interface (#2809)

* [explore] include ControlHeader as part of Control interface

* Adressing comments
This commit is contained in:
Maxime Beauchemin
2017-05-25 11:54:26 -07:00
committed by GitHub
parent 0c9f9b695b
commit 4d12251806
9 changed files with 51 additions and 36 deletions

View File

@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormGroup, FormControl } from 'react-bootstrap';
import ControlHeader from '../ControlHeader';
const propTypes = {
name: PropTypes.string.isRequired,
@@ -23,14 +24,17 @@ export default class TextAreaControl extends React.Component {
}
render() {
return (
<FormGroup controlId="formControlsTextarea">
<FormControl
componentClass="textarea"
placeholder="textarea"
onChange={this.onChange.bind(this)}
value={this.props.value}
/>
</FormGroup>
<div>
<ControlHeader {...this.props} />
<FormGroup controlId="formControlsTextarea">
<FormControl
componentClass="textarea"
placeholder="textarea"
onChange={this.onChange.bind(this)}
value={this.props.value}
/>
</FormGroup>
</div>
);
}
}