Less opacity for default values #73

This commit is contained in:
Lukas Martinelli 2017-01-15 17:10:38 +01:00
parent 16bedcf5b1
commit 8f6006c19f
2 changed files with 9 additions and 6 deletions

View file

@ -132,7 +132,6 @@ export default class ZoomSpecProperty extends React.Component {
if(this.props.fieldSpec['zoom-function']) { if(this.props.fieldSpec['zoom-function']) {
zoomBtn = <MakeZoomFunctionButton onClick={this.makeZoomFunction.bind(this)} /> zoomBtn = <MakeZoomFunctionButton onClick={this.makeZoomFunction.bind(this)} />
} }
return <InputBlock return <InputBlock
doc={this.props.fieldSpec.doc} doc={this.props.fieldSpec.doc}
label={labelFromFieldName(this.props.fieldName)} label={labelFromFieldName(this.props.fieldName)}
@ -143,11 +142,10 @@ export default class ZoomSpecProperty extends React.Component {
} }
render() { render() {
if(isZoomField(this.props.value)) { const propClass = this.props.fieldSpec.default === this.props.value ? "maputnik-default-property" : "maputnik-modified-property"
return this.renderZoomProperty(); return <div className={propClass}>
} else { {isZoomField(this.props.value) ? this.renderZoomProperty() : this.renderProperty()}
return this.renderProperty(); </div>
}
} }
} }

View file

@ -129,3 +129,8 @@
background-color: $color-gray; background-color: $color-gray;
} }
} }
// PROPERTY
.maputnik-default-property {
opacity: 0.4;
}