diff --git a/src/fields/boolean.jsx b/src/fields/boolean.jsx index 1dfe453..aae1040 100644 --- a/src/fields/boolean.jsx +++ b/src/fields/boolean.jsx @@ -11,20 +11,17 @@ class BooleanField extends React.Component { } render() { - return
- - {this.props.onChange(!this.props.value)}} - checked={this.props.value} - > - -
+ return {this.props.onChange(!this.props.value)}} + checked={this.props.value} + > + } } diff --git a/src/fields/color.jsx b/src/fields/color.jsx index a958b87..f100d84 100644 --- a/src/fields/color.jsx +++ b/src/fields/color.jsx @@ -33,7 +33,8 @@ class ColorField extends React.Component { render() { const picker =
- return
+ return
{this.state.pickerOpened && picker} - {val} }) - return
- - -
+ return } } diff --git a/src/fields/number.jsx b/src/fields/number.jsx index d9cf59b..29a57be 100644 --- a/src/fields/number.jsx +++ b/src/fields/number.jsx @@ -25,20 +25,17 @@ class NumberField extends React.Component { } render() { - return
- - -
+ return } } diff --git a/src/fields/spec.jsx b/src/fields/spec.jsx index 9fa1078..ec792d3 100644 --- a/src/fields/spec.jsx +++ b/src/fields/spec.jsx @@ -36,24 +36,29 @@ class ZoomSpecField extends React.Component { } render() { + const label = + if(isZoomField(this.props.value)) { const zoomFields = this.props.value.get('stops').map(stop => { const zoomLevel = stop.get(0) const value = stop.get(1) - return
- Zoom Level {zoomLevel} + return
+ {label} } else { - return + return
+ {label} + +
} } } @@ -104,13 +112,12 @@ class SpecField extends React.Component { } render() { - const label = labelFromFieldName(this.props.fieldName) switch(this.props.fieldSpec.type) { case 'number': return ( @@ -142,7 +149,7 @@ class SpecField extends React.Component { @@ -151,7 +158,7 @@ class SpecField extends React.Component { diff --git a/src/fields/string.jsx b/src/fields/string.jsx index 10155cc..f86b450 100644 --- a/src/fields/string.jsx +++ b/src/fields/string.jsx @@ -18,19 +18,16 @@ class StringField extends React.Component { } render() { - return
- - -
+ return } }