chore: wiring ControlLabel to a new FormLabel (#10388)

* chore: wiring ControlLabel to a new FormLabel

Creating new simple <FormLabel /> component and wiring all <label>
and react-bootstrap.ControlLabel towards it.

FormLabel becomes a pivotal point that can be altered to point to AntD
when we're ready.

* lint

* ViewportControl

* addressing comments
This commit is contained in:
Maxime Beauchemin
2020-07-23 00:27:22 -07:00
committed by GitHub
parent ea53916730
commit b438ba9ed5
16 changed files with 113 additions and 70 deletions

View File

@@ -21,6 +21,7 @@ import PropTypes from 'prop-types';
import { Label, Popover, OverlayTrigger } from 'react-bootstrap';
import { decimal2sexagesimal } from 'geolib';
import FormLabel from 'src/components/FormLabel';
import TextControl from './TextControl';
import ControlHeader from '../ControlHeader';
@@ -67,7 +68,7 @@ export default class ViewportControl extends React.Component {
renderTextControl(ctrl) {
return (
<div key={ctrl}>
{ctrl}
<FormLabel>{ctrl}</FormLabel>
<TextControl
value={this.props.value[ctrl]}
onChange={this.onChange.bind(this, ctrl)}