Simplifying the Fields (Controls) interface (#1868)

* Simplifying the Field interface / logic

* Moving ControlLabelWithTooltip where it belongs

* Progress

* Rename FieldClass->FieldType
This commit is contained in:
Maxime Beauchemin
2017-01-04 15:46:52 -08:00
committed by GitHub
parent 861a3bd4ae
commit 7aab8b0ae3
7 changed files with 111 additions and 119 deletions

View File

@@ -1,6 +1,5 @@
import React, { PropTypes } from 'react';
import { Checkbox } from 'react-bootstrap';
import ControlLabelWithTooltip from './ControlLabelWithTooltip';
const propTypes = {
name: PropTypes.string.isRequired,
@@ -24,12 +23,9 @@ export default class CheckboxField extends React.Component {
render() {
return (
<Checkbox
inline
checked={this.props.value}
onChange={this.onToggle.bind(this)}
>
<ControlLabelWithTooltip label={this.props.label} description={this.props.description} />
</Checkbox>
/>
);
}
}